21#include "../properties/xrefproperties.h"
23#include <QGraphicsObject>
63 enum {
Type = UserType + 1009 };
83 QPainterPath
shape()
const override;
86 const bool &add_prefix =
false)
const;
95 void paint(QPainter *painter,
96 const QStyleOptionGraphicsItem *option,
97 QWidget *widget)
override;
99 QGraphicsSceneMouseEvent * event )
override;
The CrossRefItem class This clas provide an item, for show the cross reference, like the contacts lin...
Definition crossrefitem.h:47
void drawAsCross(QPainter &painter)
CrossRefItem::drawAsCross Draw this crossref with a cross.
Definition crossrefitem.cpp:565
void buildHeaderContact()
CrossRefItem::buildHeaderContact Draw the QPicture of m_hdr_no_ctc and m_hdr_nc_ctc.
Definition crossrefitem.cpp:454
void updateProperties()
CrossRefItem::updateProperties update the current properties.
Definition crossrefitem.cpp:195
QPicture m_drawing
Definition crossrefitem.h:120
QPicture m_hdr_nc_ctc
Definition crossrefitem.h:120
void AddExtraInfo(QPainter &painter, const QString &)
CrossRefItem::AddExtraInfo Add the comment info of the parent item if needed.
Definition crossrefitem.cpp:942
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override
CrossRefItem::hoverEnterEvent.
Definition crossrefitem.cpp:347
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override
CrossRefItem::hoverLeaveEvent.
Definition crossrefitem.cpp:415
void init()
CrossRefItem::init init this Xref.
Definition crossrefitem.cpp:76
QList< QMetaObject::Connection > m_slave_connection
Definition crossrefitem.h:128
void autoPos()
CrossRefItem::autoPos Calculate and set position automatically.
Definition crossrefitem.cpp:252
QPicture m_hdr_no_ctc
Definition crossrefitem.h:120
QString elementPositionText(const Element *elmt, const bool &add_prefix=false) const
CrossRefItem::elementPositionText.
Definition crossrefitem.cpp:170
CONTACTS
The CONTACTS enum.
Definition crossrefitem.h:69
@ NC
Definition crossrefitem.h:71
@ DelayOn
Definition crossrefitem.h:75
@ DelayOnOff
Definition crossrefitem.h:77
@ NO
Definition crossrefitem.h:70
@ NOC
Definition crossrefitem.h:72
@ Power
Definition crossrefitem.h:74
@ Delay
Definition crossrefitem.h:78
@ DelayOff
Definition crossrefitem.h:76
@ Other
Definition crossrefitem.h:79
@ SW
Definition crossrefitem.h:73
~CrossRefItem() override
CrossRefItem::~CrossRefItem Default destructor.
Definition crossrefitem.cpp:69
DynamicElementTextItem * m_text
Definition crossrefitem.h:126
Element * m_hovered_contact
Definition crossrefitem.h:125
Element * m_element
Definition crossrefitem.h:118
bool sceneEvent(QEvent *event) override
CrossRefItem::sceneEvent.
Definition crossrefitem.cpp:270
void fillCrossRef(QPainter &painter)
CrossRefItem::fillCrossRef Fill the content of the cross ref.
Definition crossrefitem.cpp:872
QRectF boundingRect() const override
CrossRefItem::boundingRect.
Definition crossrefitem.cpp:149
QMultiMap< Element *, QRectF > m_hovered_contacts_map
Definition crossrefitem.h:124
void linkedChanged()
CrossRefItem::linkedChanged.
Definition crossrefitem.cpp:425
ElementTextItemGroup * m_group
Definition crossrefitem.h:127
XRefProperties m_properties
Definition crossrefitem.h:122
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
CrossRefItem::mouseDoubleClickEvent.
Definition crossrefitem.cpp:320
QRectF drawContact(QPainter &painter, int flags, Element *elmt)
CrossRefItem::drawContact Draw one contact, the type of contact to draw is define in flags.
Definition crossrefitem.cpp:644
void drawAsContacts(QPainter &painter)
CrossRefItem::drawAsContacts Draw this crossref with symbolic contacts.
Definition crossrefitem.cpp:595
void updateLabel()
CrossRefItem::updateLabel Update the content of the item.
Definition crossrefitem.cpp:217
void setUpConnection()
CrossRefItem::setUpConnection Set up several connection to keep up to date the Xref.
Definition crossrefitem.cpp:99
void setUpCrossBoundingRect(QPainter &painter)
CrossRefItem::setUpCrossBoundingRect Get the numbers of slaves elements linked to this parent element...
Definition crossrefitem.cpp:505
@ Type
Definition crossrefitem.h:63
QList< QMetaObject::Connection > m_update_connection
Definition crossrefitem.h:129
QRectF m_bounding_rect
Definition crossrefitem.h:119
QList< Element * > NOElements() const
CrossRefItem::NOElements.
Definition crossrefitem.cpp:995
int type() const override
Definition crossrefitem.h:64
int m_drawed_contacts
Definition crossrefitem.h:123
QPainterPath m_shape_path
Definition crossrefitem.h:121
QPainterPath shape() const override
CrossRefItem::shape.
Definition crossrefitem.cpp:158
void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override
CrossRefItem::hoverMoveEvent.
Definition crossrefitem.cpp:357
QList< Element * > NCElements() const
CrossRefItem::NCElements.
Definition crossrefitem.cpp:1028
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
CrossRefItem::paint Paint this item.
Definition crossrefitem.cpp:306
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
Definition dynamicelementtextitem.h:40
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
Definition elementtextitemgroup.h:36
The XRefProperties class this class store properties used by XrefItem.
Definition xrefproperties.h:31