|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
18 #ifndef ELEMENTTEXTITEMGROUP_H
19 #define ELEMENTTEXTITEMGROUP_H
21 #include <QGraphicsItemGroup>
23 #include <QDomElement>
76 QList<DynamicElementTextItem *>
texts()
const;
80 QDomElement
toXml(QDomDocument &dom_document)
const;
81 void fromXml(QDomElement &dom_element);
84 void paint(QPainter *painter,
85 const QStyleOptionGraphicsItem *option,
86 QWidget *widget)
override;
90 void setPos(qreal x, qreal y);
96 QGraphicsSceneMouseEvent *event)
override;
98 QGraphicsSceneMouseEvent *event)
override;
125 #endif // ELEMENTTEXTITEMGROUP_H
virtual kind linkType() const
Definition: element.h:159
bool m_first_move
Definition: elementtextitemgroup.h:111
bool addTextToGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
Element::addTextToGroup Add the text text to the group group; If group isn't owned by this element re...
Definition: element.cpp:1432
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
Definition: dynamicelementtextitem.h:39
void continueMovement(QGraphicsSceneMouseEvent *event)
Definition: elementtextsmover.cpp:82
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
int verticalAdjustment() const
Definition: elementtextitemgroup.h:68
QRectF boundingRect() const override
ElementTextItemGroup::boundingRect.
Definition: elementtextitemgroup.cpp:503
void holdToBottomPageChanged(bool)
Diagram * diagram() const
Definition: qetgraphicsitem.cpp:40
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
Definition: elementtextitemgroup.cpp:614
bool m_block_alignment_update
Definition: elementtextitemgroup.h:113
QPointF pos
Definition: elementtextitemgroup.h:39
Element * parentElement() const
ElementTextItemGroup::parentElement.
Definition: elementtextitemgroup.cpp:357
ElementTextsMover & elementTextsMover()
Diagram::elementTextsMover.
Definition: diagram.cpp:2065
int verticalAdjustment
Definition: elementtextitemgroup.h:41
~ElementTextItemGroup() override
Definition: elementtextitemgroup.cpp:63
void adjustSlaveXrefPos()
Definition: elementtextitemgroup.cpp:779
virtual void setHighlighted(bool)
Definition: element.cpp:178
void diagramRemoved(QETProject *, Diagram *)
void showMe()
Definition: diagram.h:161
void fromXml(QDomElement &dom_element)
ElementTextItemGroup::fromXml Import data of this group from xml.
Definition: elementtextitemgroup.cpp:405
void setName(QString name)
ElementTextItemGroup::setName.
Definition: elementtextitemgroup.cpp:268
void updateAlignment()
ElementTextItemGroup::setAlignment Update the alignement of the items in this group,...
Definition: elementtextitemgroup.cpp:162
void elementInfoChange(DiagramContext old_info, DiagramContext new_info)
void linkedElementChanged()
static QString xmlTaggName()
Definition: elementtextitemgroup.h:82
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 compositeTextChanged(QString text)
@ Slave
Definition: element.h:56
@ Type
Definition: element.h:74
QList< QDomElement > findInDomElement(const QDomElement &, const QString &)
Definition: qet.cpp:333
@ Label
Definition: xrefproperties.h:40
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
ElementTextItemGroup::mouseReleaseEvent.
Definition: elementtextitemgroup.cpp:601
QETProject * project() const
Diagram::project.
Definition: diagram.cpp:2326
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
ElementTextItemGroup::paint.
Definition: elementtextitemgroup.cpp:451
Qt::Alignment alignment
Definition: elementtextitemgroup.h:42
Qt::Alignment m_alignment
Definition: elementtextitemgroup.h:109
bool m_hold_to_bottom_of_page
Definition: elementtextitemgroup.h:112
int offset() const
Definition: xrefproperties.h:76
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition: diagram.h:56
@ Type
Definition: dynamicelementtextitem.h:61
bool holdToBottomPage
Definition: elementtextitemgroup.h:44
The XRefProperties class this class store properties used by XrefItem.
Definition: xrefproperties.h:29
void frameChanged(bool frame)
QMetaObject::Connection m_linked_changed_timer
Definition: elementtextitemgroup.h:122
DiagramContext kindInformations() const
Definition: element.h:100
int beginMovement(Diagram *diagram, QGraphicsItem *driver_item=nullptr)
ElementTextsMover::beginMovement Begin a movement.
Definition: elementtextsmover.cpp:46
void textWidthChanged(qreal width)
void setPos(const QPointF &pos)
Definition: elementtextitemgroup.cpp:525
QString slaveLabel() const
Definition: xrefproperties.h:73
void endMovement()
ElementTextsMover::endMovement Finish the movement by pushing an undo command to the parent diagram o...
Definition: elementtextsmover.cpp:107
void setRotation(qreal angle)
Definition: elementtextitemgroup.cpp:519
Element * m_parent_element
Definition: elementtextitemgroup.h:118
QDomElement toXml(QDomDocument &dom_document) const
ElementTextItemGroup::toXml Export data of this group to xml.
Definition: elementtextitemgroup.cpp:371
@ Master
Definition: element.h:55
QList< DynamicElementTextItem * > texts() const
ElementTextItemGroup::texts.
Definition: elementtextitemgroup.cpp:330
ElementTextItemGroup(const QString &name, Element *parent)
ElementTextItemGroup::ElementTextItemGroup.
Definition: elementtextitemgroup.cpp:49
void fontChanged(QFont font)
void textFromChanged(DynamicElementTextItem::TextFrom text_from)
void keyPressEvent(QKeyEvent *event) override
ElementTextItemGroup::keyPressEvent.
Definition: elementtextitemgroup.cpp:650
@ CompositeText
Definition: dynamicelementtextitem.h:58
The AlignmentTextsGroupCommand class.
Definition: addelementtextcommand.h:145
void removeFromGroup(QGraphicsItem *item)
ElementTextItemGroup::removeFromGroup.
Definition: elementtextitemgroup.cpp:101
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
ElementTextItemGroup::mouseMoveEvent.
Definition: elementtextitemgroup.cpp:565
void nameChanged(QString)
bool sorting(QGraphicsItem *qgia, QGraphicsItem *qgib)
sorting
Definition: elementtextitemgroup.cpp:39
QUndoStack & undoStack()
Diagram::undoStack.
Definition: diagram.h:397
void alignmentChanged(Qt::Alignment)
int m_vertical_adjustment
Definition: elementtextitemgroup.h:116
The MasterElement class This class is a custom element, with extended behavior to be a master element...
Definition: masterelement.h:32
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
CrossRefItem * m_Xref_item
Definition: elementtextitemgroup.h:117
void infoNameChanged(QString info)
void setFrame(const bool frame)
Definition: elementtextitemgroup.cpp:315
QString name() const
Definition: elementtextitemgroup.h:71
void addToGroup(QGraphicsItem *item)
ElementTextItemGroup::addToGroup.
Definition: elementtextitemgroup.cpp:70
QPointF m_initial_position
Definition: elementtextitemgroup.h:115
bool holdToBottomPage() const
Definition: elementtextitemgroup.h:73
void autoPos()
Definition: elementtextitemgroup.cpp:787
QList< QMetaObject::Connection > m_update_slave_Xref_connection
Definition: elementtextitemgroup.h:119
Definition: qetproject.h:51
void setAlignment(Qt::Alignment alignement)
ElementTextItemGroup::setAlignement Set the alignement of this group.
Definition: elementtextitemgroup.cpp:144
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
Definition: elementtextitemgroup.h:36
QString m_name
Definition: elementtextitemgroup.h:110
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
ElementTextItemGroup::mousePressEvent.
Definition: elementtextitemgroup.cpp:549
QIcon ro
Definition: qeticons.cpp:200
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override
Definition: elementtextitemgroup.cpp:690
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override
Definition: elementtextitemgroup.cpp:679
void updateXref()
Definition: elementtextitemgroup.cpp:698
static QPointF snapToGrid(const QPointF &p)
Diagram::snapToGrid Return a nearest snap point of p.
Definition: diagram.cpp:2240
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 setHoldToBottomPage(bool hold)
Definition: elementtextitemgroup.cpp:274
bool m_frame
Definition: elementtextitemgroup.h:114
void XRefPropertiesChanged()
void verticalAdjustmentChanged(int)
void setVerticalAdjustment(int v)
ElementTextItemGroup::setVerticalAdjustment Set the value of the vertical adjustment to v....
Definition: elementtextitemgroup.cpp:256
QString name
Definition: elementtextitemgroup.h:43
QRectF XrefBoundingRect() const
MasterElement::XrefBoundingRect.
Definition: masterelement.cpp:118
SnapTo snapTo() const
Definition: xrefproperties.h:62
autonum::sequentialNumbers & rSequenceStruct()
Definition: element.h:108
QMetaObject::Connection m_XrefChanged_timer
Definition: elementtextitemgroup.h:121
void blockAlignmentUpdate(bool block)
ElementTextItemGroup::blockAlignmentUpdate If true, the texts in this group are never aligned,...
Definition: elementtextitemgroup.cpp:134
bool frame
Definition: elementtextitemgroup.h:45
XRefProperties defaultXRefProperties(const QString &type) const
Definition: qetproject.h:106
@ ElementInfo
Definition: dynamicelementtextitem.h:57
Diagram * diagram() const
ElementTextItemGroup::diagram.
Definition: elementtextitemgroup.cpp:345
QGraphicsTextItem * m_slave_Xref_item
Definition: elementtextitemgroup.h:120
void textChanged(QString text)
The CrossRefItem class This clas provide an item, for show the cross reference, like the contacts lin...
Definition: crossrefitem.h:47
qreal rotation
Definition: elementtextitemgroup.h:40
void rotationChanged(qreal)