mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-17 23:59:58 +01:00
Element text item with are now converted to dynamic element text item.
From now, the class ElementTextItem is not anymore use in qet. Every texts in a diagram are DynamicElementTextItem. the Xref item was adapted to dynamic text. Previously, the comment and location, displayed as a "static text" below the "old text" tagged "label" are now automaticaly converted to DynamicElementTextItem, so visually, these texts stay unchanged git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5216 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
class Element;
|
||||
class DynamicElementTextItem;
|
||||
class Diagram;
|
||||
class CrossRefItem;
|
||||
|
||||
/**
|
||||
* @brief The ElementTextItemGroup class
|
||||
@@ -77,7 +78,14 @@ class ElementTextItemGroup : public QObject, public QGraphicsItemGroup
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
|
||||
private:
|
||||
void updateXref();
|
||||
void adjustSlaveXrefPos();
|
||||
|
||||
private:
|
||||
Qt::Alignment m_alignment = Qt::AlignJustify;
|
||||
@@ -85,6 +93,10 @@ class ElementTextItemGroup : public QObject, public QGraphicsItemGroup
|
||||
bool m_first_move = true;
|
||||
QPointF m_mouse_to_origin_movement;
|
||||
int m_vertical_adjustment = 0;
|
||||
CrossRefItem *m_Xref_item = nullptr;
|
||||
Element *m_parent_element = nullptr;
|
||||
QList<QMetaObject::Connection> m_update_slave_Xref_connection;
|
||||
QGraphicsTextItem *m_slave_Xref_item = nullptr;
|
||||
};
|
||||
|
||||
#endif // ELEMENTTEXTITEMGROUP_H
|
||||
|
||||
Reference in New Issue
Block a user