|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
18 #ifndef CROSSREFITEM_H
19 #define CROSSREFITEM_H
21 #include <QGraphicsObject>
63 enum {
Type = UserType + 1009 };
82 QPainterPath
shape()
const override;
85 const bool &add_prefix =
false)
const;
94 void paint(QPainter *painter,
95 const QStyleOptionGraphicsItem *option,
96 QWidget *widget)
override;
98 QGraphicsSceneMouseEvent * event )
override;
131 #endif // CROSSREFITEM_H
QList< Element * > NOElements() const
CrossRefItem::NOElements.
Definition: crossrefitem.cpp:935
void drawAsContacts(QPainter &painter)
CrossRefItem::drawAsContacts Draw this crossref with symbolic contacts.
Definition: crossrefitem.cpp:575
void init()
CrossRefItem::init init this Xref.
Definition: crossrefitem.cpp:74
int type() const override
Definition: crossrefitem.h:64
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
Definition: dynamicelementtextitem.h:39
Definition: assignvariables.h:35
void autoPos()
CrossRefItem::autoPos Calculate and set position automaticaly.
Definition: crossrefitem.cpp:235
void projectDiagramsOrderChanged(QETProject *, int, int)
QList< Element * > linkedElements()
Element::linkedElements.
Definition: element.h:258
DiagramContext elementInformations() const
Definition: element.h:97
Diagram * diagram() const
Definition: qetgraphicsitem.cpp:40
void AddExtraInfo(QPainter &painter, const QString &)
CrossRefItem::AddExtraInfo Add the comment info of the parent item if needed.
Definition: crossrefitem.cpp:882
void setUpCrossBoundingRect(QPainter &painter)
CrossRefItem::setUpCrossBoundingRect Get the numbers of slaves elements linked to this parent element...
Definition: crossrefitem.cpp:484
@ Cross
Definition: xrefproperties.h:34
QRectF boundingRect() const override
CrossRefItem::boundingRect.
Definition: crossrefitem.cpp:129
void setUpConnection()
CrossRefItem::setUpConnection Set up several connection to keep up to date the Xref.
Definition: crossrefitem.cpp:97
void updateProperties()
CrossRefItem::updateProperties update the curent properties.
Definition: crossrefitem.cpp:178
bool centerToParentBottom(QGraphicsItem *item)
centerToParentBottom Center the item at the bottom of is parent.
Definition: qgraphicsitemutility.cpp:30
void diagramRemoved(QETProject *, Diagram *)
void showMe()
Definition: diagram.h:161
@ Type
Definition: crossrefitem.h:63
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
CrossRefItem::mouseDoubleClickEvent.
Definition: crossrefitem.cpp:300
CONTACTS
The CONTACTS enum.
Definition: crossrefitem.h:69
@ Delay
Definition: crossrefitem.h:78
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
CrossRefItem::paint Paint this item.
Definition: crossrefitem.cpp:288
void drawAsCross(QPainter &painter)
CrossRefItem::drawAsCross Draw this crossref with a cross.
Definition: crossrefitem.cpp:545
void linkedElementChanged()
bool centerToBottomDiagram(QGraphicsItem *item_to_center, Element *element_to_follow, qreal offset)
centerToBottomDiagram Set item pos to the bottom of diagram and centered vertically to element_to_fol...
Definition: qgraphicsitemutility.cpp:54
void buildHeaderContact()
CrossRefItem::buildHeaderContact Draw the QPicture of m_hdr_no_ctc and m_hdr_nc_ctc.
Definition: crossrefitem.cpp:434
void linkedChanged()
CrossRefItem::linkedChanged.
Definition: crossrefitem.cpp:405
@ Label
Definition: xrefproperties.h:40
QETProject * project() const
Diagram::project.
Definition: diagram.cpp:2326
QList< Element * > NCElements() const
CrossRefItem::NCElements.
Definition: crossrefitem.cpp:968
QRectF m_bounding_rect
Definition: crossrefitem.h:118
QPicture m_hdr_nc_ctc
Definition: crossrefitem.h:119
int offset() const
Definition: xrefproperties.h:76
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:623
The XRefProperties class this class store properties used by XrefItem.
Definition: xrefproperties.h:29
DiagramContext kindInformations() const
Definition: element.h:100
QString masterLabel() const
Definition: xrefproperties.h:70
void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override
CrossRefItem::hoverMoveEvent.
Definition: crossrefitem.cpp:337
@ DelayOff
Definition: crossrefitem.h:76
QList< QMetaObject::Connection > m_slave_connection
Definition: crossrefitem.h:127
@ SW
Definition: crossrefitem.h:73
void updateLabel()
CrossRefItem::updateLabel Update the content of the item.
Definition: crossrefitem.cpp:200
Element * m_hovered_contact
Definition: crossrefitem.h:124
@ Contacts
Definition: xrefproperties.h:35
QList< QMetaObject::Connection > m_update_connection
Definition: crossrefitem.h:128
QPicture m_drawing
Definition: crossrefitem.h:119
int m_drawed_contacts
Definition: crossrefitem.h:122
@ NOC
Definition: crossrefitem.h:72
CrossRefItem(Element *elmt)
CrossRefItem::CrossRefItem.
Definition: crossrefitem.cpp:37
Element * m_element
Definition: crossrefitem.h:117
DisplayHas
Definition: xrefproperties.h:33
bool isFree() const
Definition: element.h:230
void fillCrossRef(QPainter &painter)
CrossRefItem::fillCrossRef Fill the content of the cross ref.
Definition: crossrefitem.cpp:812
static QString formulaToLabel(QString formula, sequentialNumbers &seqStruct, Diagram *diagram, const Element *elmt=nullptr)
AssignVariables::formulaToLabel Return the formula with variable assigned (ready to be displayed)
Definition: assignvariables.cpp:187
ElementTextItemGroup * m_group
Definition: crossrefitem.h:126
@ DelayOnOff
Definition: crossrefitem.h:77
QString elementPositionText(const Element *elmt, const bool &add_prefix=false) const
CrossRefItem::elementPositionText.
Definition: crossrefitem.cpp:149
~CrossRefItem() override
CrossRefItem::~CrossRefItem Default destructor.
Definition: crossrefitem.cpp:68
QPainterPath shape() const override
CrossRefItem::shape.
Definition: crossrefitem.cpp:137
Definition: qetproject.h:51
QPicture m_hdr_no_ctc
Definition: crossrefitem.h:119
@ Power
Definition: crossrefitem.h:74
bool showPowerContact() const
Definition: xrefproperties.h:56
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
Definition: elementtextitemgroup.h:36
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override
CrossRefItem::hoverEnterEvent.
Definition: crossrefitem.cpp:327
QString prefix(const QString &key) const
Definition: xrefproperties.h:67
bool sceneEvent(QEvent *event) override
CrossRefItem::sceneEvent.
Definition: crossrefitem.cpp:252
XRefProperties m_properties
Definition: crossrefitem.h:121
static QFont diagramTextsFont(qreal=-1.0)
QETApp::diagramTextsFont The font to use By default the font is "sans Serif" and size 9.
Definition: qetapp.cpp:1111
@ Bottom
Definition: xrefproperties.h:39
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override
CrossRefItem::hoverLeaveEvent.
Definition: crossrefitem.cpp:395
bool contains(const QString &) const
Definition: diagramcontext.cpp:70
DisplayHas displayHas() const
Definition: xrefproperties.h:59
void XRefPropertiesChanged()
QMultiMap< Element *, QRectF > m_hovered_contacts_map
Definition: crossrefitem.h:123
@ NO
Definition: crossrefitem.h:70
SnapTo snapTo() const
Definition: xrefproperties.h:62
@ NC
Definition: crossrefitem.h:71
QIcon br
Definition: qeticons.cpp:185
autonum::sequentialNumbers & rSequenceStruct()
Definition: element.h:108
XRefProperties defaultXRefProperties(const QString &type) const
Definition: qetproject.h:106
DynamicElementTextItem * m_text
Definition: crossrefitem.h:125
@ DelayOn
Definition: crossrefitem.h:75
Definition: diagramcontext.h:56
The CrossRefItem class This clas provide an item, for show the cross reference, like the contacts lin...
Definition: crossrefitem.h:47
QPainterPath m_shape_path
Definition: crossrefitem.h:120