mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-21 04:29:58 +02:00
Cross ref item : Double click in a contact of the Xref, go to the real contact. (only available for Xref draw as contacts)
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4784 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -75,13 +75,16 @@ class CrossRefItem : public QGraphicsObject
|
||||
protected:
|
||||
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent * event );
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
|
||||
private:
|
||||
void buildHeaderContact ();
|
||||
void setUpCrossBoundingRect (QPainter &painter);
|
||||
void drawAsCross (QPainter &painter);
|
||||
void drawAsContacts (QPainter &painter);
|
||||
QRectF drawContact (QPainter &painter, int flags, QString str = QString());
|
||||
QRectF drawContact (QPainter &painter, int flags, Element *elmt);
|
||||
void fillCrossRef (QPainter &painter);
|
||||
void AddExtraInfo (QPainter &painter, QString);
|
||||
void setTextParent ();
|
||||
@@ -94,6 +97,10 @@ class CrossRefItem : public QGraphicsObject
|
||||
QPainterPath m_shape_path;
|
||||
XRefProperties m_properties;
|
||||
int m_drawed_contacts;
|
||||
QMap <Element *, QRectF> m_hovered_contacts_map;
|
||||
Element *m_hovered_contact = nullptr;
|
||||
QRectF m_hover_text_rect;
|
||||
|
||||
};
|
||||
|
||||
#endif // CROSSREFITEM_H
|
||||
|
||||
Reference in New Issue
Block a user