Add undo command for QetShapeItem geometry change

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4046 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-07-12 13:35:40 +00:00
parent 57fdcd70a4
commit 27117ef9d1
5 changed files with 249 additions and 30 deletions

View File

@@ -22,6 +22,7 @@
class QDomElement;
class QDomDocument;
class QetShapeGeometryCommand;
/**
* @brief The QetShapeItem class
@@ -53,6 +54,7 @@ class QetShapeItem : public QetGraphicsItem
///METHODS
void setStyle(Qt::PenStyle);
Qt::PenStyle penStyle() const { return m_shapeStyle;}
ShapeType shapeType() const {return m_shapeType;}
virtual bool fromXml (const QDomElement &);
virtual QDomElement toXml (QDomDocument &document) const;
@@ -61,9 +63,10 @@ class QetShapeItem : public QetGraphicsItem
virtual void editProperty();
virtual QString name() const;
void setP2 (QPointF P2);
void setP2 (const QPointF &P2);
void setLine (const QLineF &line);
bool setRect (const QRectF &rect);
bool setPolygon (const QPolygon &polygon);
bool setPolygon (const QPolygonF &polygon);
//Methods available for polygon shape
int pointsCount () const;
@@ -93,5 +96,6 @@ class QetShapeItem : public QetGraphicsItem
bool m_hovered,
m_mouse_grab_handler;
int m_vector_index;
QetShapeGeometryCommand *m_undo_command;
};
#endif // QETSHAPEITEM_H