mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-03 11:00:53 +01:00
* Added the m_rotate_action to qetelementeditor.ui * Adding QAction to qetelementeditor.cpp and connecting it to new slot RotateElementsCommand defined in editorcommands.cpp
* Some types of elements need to specialize the setRotation method in order to behave correctly : - PartTerminal needs to call setOrientation - PartLine, PartRectangle and PartPolygon need a different rotation center.
This commit is contained in:
committed by
Laurent Trinques
parent
9135099dbf
commit
c640d96bca
@@ -87,6 +87,9 @@ class PartPolygon : public CustomElementGraphicPart
|
||||
void setHandlerColor(QPointF pos, const QColor &color) final;
|
||||
void resetAllHandlerColor() final;
|
||||
|
||||
void setRotation (qreal angle);
|
||||
qreal rotation () const;
|
||||
|
||||
protected:
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||
@@ -114,5 +117,6 @@ class PartPolygon : public CustomElementGraphicPart
|
||||
QAction *m_insert_point,
|
||||
*m_remove_point;
|
||||
QPointF m_context_menu_pos;
|
||||
qreal m_rot;
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user