Element editor : add two new actions in context menu for insert or remove point of a selected polygon.

All parts items : remove the 'open hand cursor' when hover a selected part.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5419 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2018-06-30 21:41:27 +00:00
parent 114c3cdcc3
commit 28faaf12c5
9 changed files with 176 additions and 38 deletions

View File

@@ -23,6 +23,7 @@
class QPropertyUndoCommand;
class QetGraphicsHandlerItem;
class QAction;
/**
* @brief The PartPolygon class
@@ -86,6 +87,7 @@ class PartPolygon : public CustomElementGraphicPart
protected:
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
private:
void adjusteHandlerPos();
@@ -96,6 +98,8 @@ class PartPolygon : public CustomElementGraphicPart
void addHandler();
void removeHandler();
void insertPoint();
void removePoint();
bool m_closed;
@@ -104,5 +108,8 @@ class PartPolygon : public CustomElementGraphicPart
QPropertyUndoCommand *m_undo_command;
int m_vector_index = -1;
QVector<QetGraphicsHandlerItem *> m_handler_vector;
QAction *m_insert_point,
*m_remove_point;
QPointF m_context_menu_pos;
};
#endif