|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
18 #ifndef DYNAMICELEMENTTEXTITEM_H
19 #define DYNAMICELEMENTTEXTITEM_H
61 enum {
Type = UserType + 1010};
82 QDomElement
toXml(QDomDocument &dom_doc)
const override;
83 void fromXml(
const QDomElement &dom_elmt)
override;
94 static QString
xmlTagName() {
return QString(
"dynamic_elmt_text");}
114 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
override;
115 QVariant
itemChange(GraphicsItemChange change,
const QVariant &value)
override;
152 QList<QMetaObject::Connection>
165 #endif // DYNAMICELEMENTTEXTITEM_H
@ Terminale
Definition: element.h:57
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override
Definition: dynamicelementtextitem.cpp:744
static QFont dynamicTextsItemFont(qreal=-1.0)
QETApp::dynamicTextsFont the default font of dynamic element text item.
Definition: qetapp.cpp:1169
virtual kind linkType() const
Definition: element.h:159
@ ProjectParsingRunning
XML parsing failed.
Definition: qetproject.h:59
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override
DynamicElementTextItem::hoverEnterEvent If the parent element of this text is a folio report or a sla...
Definition: dynamicelementtextitem.cpp:614
void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override
Definition: diagramtextitem.cpp:486
void conductorWasRemoved(Conductor *conductor)
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
Definition: dynamicelementtextitem.h:39
void refreshLabelConnection()
DynamicElementTextItem::refreshLabelConnection Refresh the connection of this text when the source of...
Definition: dynamicelementtextitem.cpp:293
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
DiagramTextItem::mousePressEvent.
Definition: diagramtextitem.cpp:319
void continueMovement(QGraphicsSceneMouseEvent *event)
Definition: elementtextsmover.cpp:82
void setPlainText(const QString &text)
Definition: dynamicelementtextitem.cpp:1322
void autoPos()
CrossRefItem::autoPos Calculate and set position automaticaly.
Definition: crossrefitem.cpp:235
void projectDiagramsOrderChanged(QETProject *, int, int)
void zoomToLinkedElement()
DynamicElementTextItem::zoomToLinkedElement If the parent element is a folio report or a slave elemen...
Definition: dynamicelementtextitem.cpp:1206
void titleBlockFolioChanged(const QString &)
titleBlockFolioChanged Signal emitted after Folio has changed
qreal m_text_width
Definition: dynamicelementtextitem.h:161
QList< Element * > linkedElements()
Element::linkedElements.
Definition: element.h:258
Diagram * diagram() const
DiagramTextItem::diagram.
Definition: diagramtextitem.cpp:63
Qt::AlignmentFlag getXrefPos() const
Definition: xrefproperties.h:65
QString infoName
Definition: dynamicelementtextitem.h:48
DiagramContext elementInformations() const
Definition: element.h:97
Diagram * diagram() const
Definition: qetgraphicsitem.cpp:40
@ NextReport
Definition: element.h:52
ElementTextsMover & elementTextsMover()
Diagram::elementTextsMover.
Definition: diagram.cpp:2065
void updateLabel()
DynamicElementTextItem::updateLabel Update the displayed text, when this dynamic text is based on the...
Definition: dynamicelementtextitem.cpp:1042
QPointF m_initial_position
Definition: dynamicelementtextitem.h:162
bool isFreezeLabel() const
Definition: element.h:114
qreal textWidth
Definition: dynamicelementtextitem.h:51
QUuid m_uuid
Definition: dynamicelementtextitem.h:150
static QString xmlTagName()
Definition: dynamicelementtextitem.h:94
virtual void setHighlighted(bool)
Definition: element.cpp:178
QString actualLabel()
Element::actualLabel Always return the current label to be displayed. This function is usefull when l...
Definition: element.cpp:1738
void diagramRemoved(QETProject *, Diagram *)
void showMe()
Definition: diagram.h:161
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
DynamicElementTextItem::mousePressEvent.
Definition: dynamicelementtextitem.cpp:527
QColor color
Definition: diagramtextitem.h:37
~DynamicElementTextItem() override
Definition: dynamicelementtextitem.cpp:65
void masterChanged()
DynamicElementTextItem::masterChanged This function is only use when the parent element is a slave....
Definition: dynamicelementtextitem.cpp:813
void setFrame(const bool frame)
Definition: dynamicelementtextitem.cpp:506
The CompositeTextEditDialog class CompositeTextEditDialog display a dialog use to write the complex t...
Definition: compositetexteditdialog.h:20
void setPlainText(const QString &text)
Definition: diagramtextitem.cpp:218
QString m_F_str
Definition: dynamicelementtextitem.h:148
void conductorWasAdded(Conductor *conductor)
DynamicElementTextItem::conductorWasAdded Function only use when parent element is a folio report.
Definition: dynamicelementtextitem.cpp:1068
bool m_first_scene_change
Definition: dynamicelementtextitem.h:158
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
DynamicElementTextItem::mouseDoubleClickEvent Reimplemented functions, for add extra feature when thi...
Definition: dynamicelementtextitem.cpp:601
void reportFormulaChanged()
DynamicElementTextItem::reportFormulaChanged The report formula use in the project was changed.
Definition: dynamicelementtextitem.cpp:886
void frameChanged(bool frame)
void elementInfoChange(DiagramContext old_info, DiagramContext new_info)
void linkedElementChanged()
@ Simple
Definition: element.h:51
void fromXml(const QDomElement &dom_elmt) override
DynamicElementTextItem::fromXml Import this text from xml.
Definition: dynamicelementtextitem.cpp:154
void compositeTextChanged(QString text)
@ Slave
Definition: element.h:56
DynamicElementTextItem::TextFrom m_text_from
Definition: dynamicelementtextitem.h:149
void setConnectionForReportFormula(const QString &formula)
Definition: dynamicelementtextitem.cpp:894
@ Label
Definition: xrefproperties.h:40
Qt::Alignment alignment
Definition: diagramtextitem.h:38
BorderTitleBlock border_and_titleblock
Diagram dimensions and title block.
Definition: diagram.h:83
QETProject * project() const
Diagram::project.
Definition: diagram.cpp:2326
void conductorPropertiesChanged()
DynamicElementTextItem::conductorPropertiesChanged This function is only used when the parent element...
Definition: dynamicelementtextitem.cpp:1143
void setupFormulaConnection()
DynamicElementTextItem::setupFormulaConnection Setup the required connection for the formula of the l...
Definition: dynamicelementtextitem.cpp:953
QPointer< Element > m_master_element
Definition: dynamicelementtextitem.h:140
bool m_frame
Definition: dynamicelementtextitem.h:157
static QString replaceVariable(const QString &formula, const DiagramContext &dc)
AssignVariables::replaceVariable Replace the variables in formula in form %{my-var} to the correspond...
Definition: assignvariables.cpp:208
QString m_report_formula
Definition: dynamicelementtextitem.h:147
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition: diagram.h:56
@ Type
Definition: dynamicelementtextitem.h:61
void updateReportText()
DynamicElementTextItem::updateReportText This function is only use when this text is owned by a repor...
Definition: dynamicelementtextitem.cpp:1012
The XRefProperties class this class store properties used by XrefItem.
Definition: xrefproperties.h:29
QString m_composite_text
Definition: dynamicelementtextitem.h:146
QUuid uuid() const
Definition: dynamicelementtextitem.cpp:518
int beginMovement(Diagram *diagram, QGraphicsItem *driver_item=nullptr)
ElementTextsMover::beginMovement Begin a movement.
Definition: elementtextsmover.cpp:46
void setText(const QString &text)
DynamicElementTextItem::setText Set the text of this text.
Definition: dynamicelementtextitem.cpp:387
void textWidthChanged(qreal width)
bool m_first_move
Definition: diagramtextitem.h:111
QString slaveLabel() const
Definition: xrefproperties.h:73
QString text
Definition: dynamicelementtextitem.h:46
void setInfoName(const QString &info_name)
DynamicElementTextItem::setInfoName Set the information name of the parent element.
Definition: dynamicelementtextitem.cpp:400
QString m_text
Definition: dynamicelementtextitem.h:144
QList< QMetaObject::Connection > m_update_slave_Xref_connection
Definition: dynamicelementtextitem.h:154
qreal correctAngle(const qreal &)
Definition: qet.cpp:545
void conductorWasRemoved(Conductor *conductor)
DynamicElementTextItem::conductorWasRemoved Function only use when parent element is a folio report.
Definition: dynamicelementtextitem.cpp:1079
void setAlignment(const Qt::Alignment &alignment)
Definition: diagramtextitem.cpp:177
QPointer< Element > m_parent_element
Definition: dynamicelementtextitem.h:139
@ Master
Definition: element.h:55
void setCompositeText(const QString &text)
DynamicElementTextItem::setCompositeText Set the composite text of this text item to text.
Definition: dynamicelementtextitem.cpp:454
void textFromChanged(DynamicElementTextItem::TextFrom text_from)
QString folio() const
Definition: bordertitleblock.h:113
QColor m_user_color
Definition: dynamicelementtextitem.h:155
bool frame
Definition: dynamicelementtextitem.h:50
@ CompositeText
Definition: dynamicelementtextitem.h:58
Element * elementUseForInfo() const
DynamicElementTextItem::elementUseForInfo.
Definition: dynamicelementtextitem.cpp:258
void updateXref()
DynamicElementTextItem::updateXref Create or delete the Xref according to the current properties of t...
Definition: dynamicelementtextitem.cpp:1251
QVariant value(const QString &key) const
Definition: diagramcontext.cpp:100
void reportPropertiesChanged(const QString &old_str, const QString &new_str)
QList< Terminal * > terminals() const
Element::terminals.
Definition: element.cpp:136
DynamicElementTextItem()
Definition: dynamicelementtextitem.cpp:78
TextFrom
Definition: dynamicelementtextitem.h:55
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
QString m_info_name
Definition: dynamicelementtextitem.h:145
void setColor(const QColor &color)
Definition: diagramtextitem.cpp:167
QString reportReplacedCompositeText() const
DynamicElementTextItem::reportReplacedCompositeText This function is only used when the parent elemen...
Definition: dynamicelementtextitem.cpp:1170
@ UserText
Definition: dynamicelementtextitem.h:56
@ AllReport
Definition: element.h:54
Element * parentElement() const
DynamicElementTextItem::ParentElement.
Definition: dynamicelementtextitem.cpp:227
void finishAlignment()
DiagramTextItem::finishAlignment Call this function after changing the bouding rect of this text to s...
Definition: diagramtextitem.cpp:410
void infoNameChanged(QString info)
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override
DiagramTextItem::paint Draw this text field. This method draw the text by calling QGraphicsTextItem::...
Definition: diagramtextitem.cpp:236
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
Definition: dynamicelementtextitem.cpp:682
QPointer< Element > m_other_report
Definition: dynamicelementtextitem.h:141
int type() const override
Definition: dynamicelementtextitem.h:62
Definition: diagramtextitem.h:34
QDomElement toXml(QDomDocument &dom_doc) const override
DynamicElementTextItem::toXml Export this text to xml.
Definition: dynamicelementtextitem.cpp:87
Definition: dynamicelementtextmodel.h:131
void conductorWasAdded(Conductor *conductor)
QGraphicsTextItem * m_slave_Xref_item
Definition: dynamicelementtextitem.h:160
void updateReportFormulaConnection()
Definition: dynamicelementtextitem.cpp:998
QMetaObject::Connection m_report_formula_con
Definition: dynamicelementtextitem.h:151
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
Definition: elementtextitemgroup.h:36
void reportChanged()
DynamicElementTextItem::reportChanged This function is only use when parent element of this text is a...
Definition: dynamicelementtextitem.cpp:841
TextFrom textFrom
Definition: dynamicelementtextitem.h:47
QList< QMetaObject::Connection > m_formula_connection
Definition: dynamicelementtextitem.h:153
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
Definition: diagramtextitem.cpp:303
static QMetaEnum textFromMetaEnum()
DynamicElementTextItem::textFromMetaEnum.
Definition: dynamicelementtextitem.cpp:72
QIcon ro
Definition: qeticons.cpp:200
CrossRefItem * m_Xref_item
Definition: dynamicelementtextitem.h:159
void setTextFrom(DynamicElementTextItem::TextFrom text_from)
DynamicElementTextItem::setTextFrom Set the final text is created from.
Definition: dynamicelementtextitem.cpp:324
QPointer< Conductor > m_watched_conductor
Definition: dynamicelementtextitem.h:142
DynamicElementTextItem(const DynamicElementTextItem &)
void setNoEditable(bool e=true)
Definition: diagramtextitem.h:75
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
DynamicElementTextItem::mouseReleaseEvent.
Definition: dynamicelementtextitem.cpp:582
void setFont(const QFont &font)
Definition: diagramtextitem.cpp:153
void prepareAlignment()
DiagramTextItem::prepareAlignment Call this function before changing the bounding rect of this text.
Definition: diagramtextitem.cpp:400
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
DynamicElementTextItem::mouseMoveEvent.
Definition: dynamicelementtextitem.cpp:546
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
QRectF frameRect() const
DiagramTextItem::frameRect.
Definition: diagramtextitem.cpp:192
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
Definition: dynamicelementtextitem.cpp:650
void clearFormulaConnection()
Definition: dynamicelementtextitem.cpp:991
@ GIBuildingFromXml
Item is currently building from a xml description (element)
Definition: qet.h:40
@ GILoadingFromXml
Item is loading her properties from a xml description.
Definition: qet.h:41
void XRefPropertiesChanged()
QFont font
Definition: diagramtextitem.h:40
ElementTextItemGroup * parentGroup() const
DynamicElementTextItem::parentGroup.
Definition: dynamicelementtextitem.cpp:236
Definition: conductor.h:43
QString defaultReportProperties() const
Definition: qetproject.cpp:466
QString compositeText
Definition: dynamicelementtextitem.h:49
SnapTo snapTo() const
Definition: xrefproperties.h:62
autonum::sequentialNumbers & rSequenceStruct()
Definition: element.h:108
void hoverEnterEvent(QGraphicsSceneHoverEvent *) override
Definition: diagramtextitem.cpp:472
void removeConnectionForReportFormula(const QString &formula)
Definition: dynamicelementtextitem.cpp:923
void setTextWidth(qreal width)
Definition: dynamicelementtextitem.cpp:1369
XRefProperties defaultXRefProperties(const QString &type) const
Definition: qetproject.h:106
QIcon tr
Definition: qeticons.cpp:206
@ PreviousReport
Definition: element.h:53
@ ElementInfo
Definition: dynamicelementtextitem.h:57
Definition: diagramcontext.h:56
void textEdited(const QString &old_str, const QString &new_str)
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
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override
DynamicElementTextItem::hoverLeaveEvent.
Definition: dynamicelementtextitem.cpp:638
void elementInfoChanged()
Definition: dynamicelementtextitem.cpp:765
void setXref_item(Qt::AlignmentFlag m_exHrefPos)
Definition: dynamicelementtextitem.cpp:1376
void setPotentialConductor()
DynamicElementTextItem::setPotentialConductor This function is only used when the parent element of t...
Definition: dynamicelementtextitem.cpp:1094