mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-26 20:59:58 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user