18 #ifndef CROSSREFITEM_H 19 #define CROSSREFITEM_H 21 #include <QGraphicsObject> 55 enum {
Type = UserType + 1009 };
71 QPainterPath
shape ()
const override;
81 void paint (QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
override;
115 #endif // CROSSREFITEM_H The CrossRefItem class This clas provide an item, for show the cross reference, like the contacts lin...
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
CrossRefItem::paint Paint this item.
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
ElementTextItemGroup * m_group
The XRefProperties class this class store properties used by XrefItem.
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
CrossRefItem::mouseDoubleClickEvent.
CrossRefItem(Element *elmt)
CrossRefItem::CrossRefItem.
void updateLabel()
CrossRefItem::updateLabel Update the content of the item.
QList< QMetaObject::Connection > m_slave_connection
QRectF drawContact(QPainter &painter, int flags, Element *elmt)
CrossRefItem::drawContact Draw one contact, the type of contact to draw is define in ...
void fillCrossRef(QPainter &painter)
CrossRefItem::fillCrossRef Fill the content of the cross ref.
QPainterPath shape() const override
CrossRefItem::shape.
Element * m_hovered_contact
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override
void buildHeaderContact()
CrossRefItem::buildHeaderContact Draw the QPicture of m_hdr_no_ctc and m_hdr_nc_ctc.
void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override
void setUpCrossBoundingRect(QPainter &painter)
CrossRefItem::setUpCrossBoundingRect Get the numbers of slaves elements linked to this parent element...
QPainterPath m_shape_path
QList< QMetaObject::Connection > m_update_connection
bool sceneEvent(QEvent *event) override
void AddExtraInfo(QPainter &painter, const QString &)
CrossRefItem::AddExtraInfo Add the comment info of the parent item if needed.
void updateProperties()
CrossRefItem::updateProperties update the curent properties.
int type() const override
QRectF boundingRect() const override
CrossRefItem::boundingRect.
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
QString elementPositionText(const Element *elmt, const bool &add_prefix=false) const
CrossRefItem::elementPositionText.
~CrossRefItem() override
CrossRefItem::~CrossRefItem Default destructor.
QMap< Element *, QRectF > m_hovered_contacts_map
void init()
CrossRefItem::init init this Xref.
XRefProperties m_properties
void drawAsContacts(QPainter &painter)
CrossRefItem::drawAsContacts Draw this crossref with symbolic contacts.
DynamicElementTextItem * m_text
void setUpConnection()
CrossRefItem::setUpConnection Set up several connection to keep up to date the Xref.
QList< Element * > NOElements() const
CrossRefItem::NOElements.
QList< Element * > NCElements() const
CrossRefItem::NCElements.
void autoPos()
CrossRefItem::autoPos Calculate and set position automaticaly.
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override
void drawAsCross(QPainter &painter)
CrossRefItem::drawAsCross Draw this crossref with a cross.