Commit c941266a authored by Jan Hambrecht's avatar Jan Hambrecht

Added a 'name' (QString) field to KoShape with the proper setter + getter

and replaced karbons custom shape naming solution with that.


svn path=/trunk/koffice/; revision=651857
parent 9f593072
......@@ -2,6 +2,7 @@
Copyright (C) 2006 Casper Boemann Rasmussen <cbr@boemann.dk>
Copyright (C) 2006-2007 Thomas Zander <zander@kde.org>
Copyright (C) 2006-2007 Thorsten Zachmann <zachmann@kde.org>
Copyright (C) 2007 Jan Hambrecht <jaham@gmx.net>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
......@@ -88,6 +89,7 @@ public:
QSizeF size; // size in pt
QPointF pos; // position (top left) in pt
QString shapeId;
QString name; ///< the shapes names
QMatrix matrix;
......@@ -691,3 +693,11 @@ void KoShape::applyConversion(QPainter &painter, const KoViewConverter &converte
painter.scale(zoomX, zoomY);
}
const QString & KoShape::name() const {
return d->name;
}
void KoShape::setName( const QString & name ) {
d->name = name;
}
......@@ -2,6 +2,7 @@
Copyright (C) 2006-2007 Thorsten Zachmann <zachmann@kde.org>
Copyright (C) 2006 Casper Boemann Rasmussen <cbr@boemann.dk>
Copyright (C) 2006 Thomas Zander <zander@kde.org>
Copyright (C) 2007 Jan Hambrecht <jaham@gmx.net>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
......@@ -556,6 +557,18 @@ public:
*/
QList<KoShapeConnection*> connections() const;
/**
* Returns the name of the shape.
* @return the shapes name
*/
const QString & name() const;
/**
* Sets the name of the shape.
* @param name the new shape name
*/
void setName( const QString & name );
protected:
/**
* @brief Get the tag name used for saving
......
For anyone that wants to hack on flake here is a list of things that need to be done;
* Add a 'name' (QString) field to KoShape with the proper setter + getter.
== Connectors ==
* Add properties to KoShapeConnector (Private class)
- line width
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment