QElectroTech  0.70
Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes | Friends | List of all members
DynamicElementTextItem Class Reference

The DynamicElementTextItem class This class provide a simple text field of element who can be added or removed directly from the diagram editor. This text is created to compensate a big lack of the ElementTextItem : ElementTextItem can't be added or removed directly in the diagram editor. More...

#include <dynamicelementtextitem.h>

Public Types

enum  TextFrom { UserText, ElementInfo, CompositeText }
 
enum  { Type = UserType + 1010 }
 
- Public Types inherited from DiagramTextItem
enum  { Type = UserType + 1004 }
 

Signals

void textChanged (QString text)
 
void textFromChanged (DynamicElementTextItem::TextFrom text_from)
 
void infoNameChanged (QString info)
 
void compositeTextChanged (QString text)
 
void frameChanged (bool frame)
 
void plainTextChanged ()
 
void textWidthChanged (qreal width)
 
- Signals inherited from DiagramTextItem
void colorChanged (QColor color)
 
void alignmentChanged (Qt::Alignment alignment)
 
void textEdited (const QString &old_str, const QString &new_str)
 
void fontChanged (QFont font)
 

Public Member Functions

int type () const override
 
 DynamicElementTextItem (Element *parent_element)
 DynamicElementTextItem::DynamicElementTextItem Constructor. More...
 
 ~DynamicElementTextItem () override
 
QDomElement toXml (QDomDocument &dom_doc) const override
 DynamicElementTextItem::toXml Export this text to xml. More...
 
void fromXml (const QDomElement &dom_elmt) override
 DynamicElementTextItem::fromXml Import this text from xml. More...
 
ElementparentElement () const
 DynamicElementTextItem::ParentElement. More...
 
ElementTextItemGroupparentGroup () const
 DynamicElementTextItem::parentGroup. More...
 
ElementelementUseForInfo () const
 DynamicElementTextItem::elementUseForInfo. More...
 
void refreshLabelConnection ()
 DynamicElementTextItem::refreshLabelConnection Refresh the connection of this text when the source of text is label, or composite text, with a variable %{label}. More...
 
DynamicElementTextItem::TextFrom textFrom () const
 
void setTextFrom (DynamicElementTextItem::TextFrom text_from)
 DynamicElementTextItem::setTextFrom Set the final text is created from. More...
 
QString text () const
 
void setText (const QString &text)
 DynamicElementTextItem::setText Set the text of this text. More...
 
void setInfoName (const QString &info_name)
 DynamicElementTextItem::setInfoName Set the information name of the parent element. More...
 
QString infoName () const
 
void setCompositeText (const QString &text)
 DynamicElementTextItem::setCompositeText Set the composite text of this text item to . More...
 
QString compositeText () const
 
void setFrame (const bool frame)
 
bool frame () const
 
QUuid uuid () const
 
void updateXref ()
 DynamicElementTextItem::updateXref Create or delete the Xref according to the current properties of the project. More...
 
void setPlainText (const QString &text)
 
void setTextWidth (qreal width)
 
- Public Member Functions inherited from DiagramTextItem
 DiagramTextItem (QGraphicsItem *=nullptr)
 DiagramTextItem::DiagramTextItem. More...
 
 DiagramTextItem (const QString &, QGraphicsItem *=nullptr)
 DiagramTextItem::DiagramTextItem. More...
 
int type () const override
 
Diagramdiagram () const
 DiagramTextItem::diagram. More...
 
void edit ()
 Edit the text with HtmlEditor. More...
 
QPointF mapMovementToScene (const QPointF &) const
 
QPointF mapMovementFromScene (const QPointF &) const
 
QPointF mapMovementToParent (const QPointF &) const
 
QPointF mapMovementFromParent (const QPointF &) const
 
void setFont (const QFont &font)
 
void setColor (const QColor &color)
 
QColor color () const
 
void setNoEditable (bool e=true)
 
void setAlignment (const Qt::Alignment &alignment)
 
Qt::Alignment alignment () const
 
QRectF frameRect () const
 DiagramTextItem::frameRect. More...
 
void setHtml (const QString &text)
 
void setPlainText (const QString &text)
 
bool isHtml () const
 

Static Public Member Functions

static QMetaEnum textFromMetaEnum ()
 DynamicElementTextItem::textFromMetaEnum. More...
 
static QString xmlTaggName ()
 

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 DynamicElementTextItem::mousePressEvent. More...
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 DynamicElementTextItem::mouseMoveEvent. More...
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 DynamicElementTextItem::mouseReleaseEvent. More...
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override
 DynamicElementTextItem::mouseDoubleClickEvent Reimplemented functions, for add extra feature when this text is owned by a slave. In this case if the parent slave element is linked to a master, and this text display the label of the master (both if the 'text from' is 'element info' or 'composite text') the QGraphicsView go to master and select it. More...
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 DynamicElementTextItem::hoverEnterEvent If the parent element of this text is a folio report or a slave element, the element is linked and the text display the variable "label" we set the text blue for signal the user that the text act like a link when we double click on. More...
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 DynamicElementTextItem::hoverLeaveEvent. More...
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 
bool sceneEventFilter (QGraphicsItem *watched, QEvent *event) override
 
- Protected Member Functions inherited from DiagramTextItem
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override
 DiagramTextItem::paint Draw this text field. This method draw the text by calling QGraphicsTextItem::paint. If text is hovered, this method draw the bounding rect in grey. More...
 
void focusInEvent (QFocusEvent *) override
 DiagramTextItem::focusInEvent. More...
 
void focusOutEvent (QFocusEvent *) override
 DiagramTextItem::focusOutEvent. More...
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override
 
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 DiagramTextItem::mousePressEvent. More...
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 DiagramTextItem::mouseMoveEvent. More...
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 DiagramTextItem::mouseReleaseEvent. More...
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *) override
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *) override
 
void hoverMoveEvent (QGraphicsSceneHoverEvent *) override
 
virtual void applyRotation (const qreal &)
 
void prepareAlignment ()
 DiagramTextItem::prepareAlignment Call this function before changing the bounding rect of this text. More...
 
void finishAlignment ()
 DiagramTextItem::finishAlignment Call this function after changing the bouding rect of this text to set the position of this text according to the alignment property. More...
 

Properties

QString text
 DynamicElementTextItem::text. More...
 
TextFrom textFrom
 DynamicElementTextItem::textFrom. More...
 
QString infoName
 DynamicElementTextItem::infoName. More...
 
QString compositeText
 DynamicElementTextItem::compositeText. More...
 
bool frame
 
qreal textWidth
 
- Properties inherited from DiagramTextItem
QColor color
 
Qt::Alignment alignment
 
QString plainText
 
QFont font
 

Private Member Functions

 DynamicElementTextItem ()
 
 DynamicElementTextItem (const DynamicElementTextItem &)
 
void elementInfoChanged ()
 
void masterChanged ()
 DynamicElementTextItem::masterChanged This function is only use when the parent element is a slave. Call when the master element linked to the parent slave element of this text change. More...
 
void reportChanged ()
 DynamicElementTextItem::reportChanged This function is only use when parent element of this text is a folio report The linked report of the parent element was changed. More...
 
void reportFormulaChanged ()
 DynamicElementTextItem::reportFormulaChanged The report formula use in the project was changed. More...
 
void setConnectionForReportFormula (const QString &formula)
 
void removeConnectionForReportFormula (const QString &formula)
 
void setupFormulaConnection ()
 DynamicElementTextItem::setupFormulaConnection Setup the required connection for the formula of the label. More...
 
void clearFormulaConnection ()
 
void updateReportFormulaConnection ()
 
void updateReportText ()
 DynamicElementTextItem::updateReportText This function is only use when this text is owned by a report, and this text have for info the Label. More...
 
void updateLabel ()
 DynamicElementTextItem::updateLabel Update the displayed text, when this dynamic text is based on the label of the parent element. This function is notably use when the label itself is based from a formula. If this dynamic text isn't based on label, this function do nothing. More...
 
void conductorWasAdded (Conductor *conductor)
 DynamicElementTextItem::conductorWasAdded Function only use when parent element is a folio report. More...
 
void conductorWasRemoved (Conductor *conductor)
 DynamicElementTextItem::conductorWasRemoved Function only use when parent element is a folio report. More...
 
void setPotentialConductor ()
 DynamicElementTextItem::setPotentialConductor This function is only used when the parent element of this text is a report element Get a conductor in the potential of the parent report. More...
 
void conductorPropertiesChanged ()
 DynamicElementTextItem::conductorPropertiesChanged This function is only used when the parent element of this text is a report element. More...
 
QString reportReplacedCompositeText () const
 DynamicElementTextItem::reportReplacedCompositeText This function is only used when the parent element of this text is a report element. More...
 
void zoomToLinkedElement ()
 DynamicElementTextItem::zoomToLinkedElement If the parent element is a folio report or a slave element, and is linked, zoom to the linked element. More...
 

Private Attributes

QPointer< Elementm_parent_element
 
QPointer< Elementm_master_element
 
QPointer< Elementm_other_report
 
QPointer< Conductorm_watched_conductor
 
QString m_text
 
QString m_info_name
 
QString m_composite_text
 
QString m_report_formula
 
QString m_F_str
 
DynamicElementTextItem::TextFrom m_text_from = UserText
 
QUuid m_uuid
 
QMetaObject::Connection m_report_formula_con
 
QList< QMetaObject::Connection > m_formula_connection
 
QList< QMetaObject::Connection > m_update_slave_Xref_connection
 
QColor m_user_color
 
bool m_frame = false
 
bool m_first_scene_change = true
 
CrossRefItemm_Xref_item = nullptr
 
QGraphicsTextItem * m_slave_Xref_item = nullptr
 
qreal m_text_width = -1
 
QPointF m_initial_position
 

Friends

class DynamicTextItemDelegate
 
class CompositeTextEditDialog
 
class Element
 

Additional Inherited Members

- Public Attributes inherited from DiagramTextItem
bool m_block_alignment = false
 
- Protected Attributes inherited from DiagramTextItem
bool m_mouse_hover = false
 
bool m_first_move = true
 
bool m_no_editable
 
bool m_is_html = false
 
QString m_previous_html_text
 
QString m_previous_text
 
QPointF m_mouse_to_origin_movement
 

Detailed Description

The DynamicElementTextItem class This class provide a simple text field of element who can be added or removed directly from the diagram editor. This text is created to compensate a big lack of the ElementTextItem : ElementTextItem can't be added or removed directly in the diagram editor.

Definition at line 37 of file dynamicelementtextitem.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Definition at line 60 of file dynamicelementtextitem.h.

◆ TextFrom

Enumerator
UserText 
ElementInfo 
CompositeText 

Definition at line 54 of file dynamicelementtextitem.h.

Constructor & Destructor Documentation

◆ DynamicElementTextItem() [1/3]

DynamicElementTextItem::DynamicElementTextItem ( Element parent_element)

◆ ~DynamicElementTextItem()

DynamicElementTextItem::~DynamicElementTextItem ( )
override

Definition at line 65 of file dynamicelementtextitem.cpp.

◆ DynamicElementTextItem() [2/3]

DynamicElementTextItem::DynamicElementTextItem ( )
private

Definition at line 78 of file dynamicelementtextitem.cpp.

◆ DynamicElementTextItem() [3/3]

DynamicElementTextItem::DynamicElementTextItem ( const DynamicElementTextItem )
private

Member Function Documentation

◆ clearFormulaConnection()

void DynamicElementTextItem::clearFormulaConnection ( )
private

◆ compositeText()

QString DynamicElementTextItem::compositeText ( ) const

◆ compositeTextChanged

void DynamicElementTextItem::compositeTextChanged ( QString  text)
signal

◆ conductorPropertiesChanged()

void DynamicElementTextItem::conductorPropertiesChanged ( )
private

◆ conductorWasAdded()

void DynamicElementTextItem::conductorWasAdded ( Conductor conductor)
private

DynamicElementTextItem::conductorWasAdded Function only use when parent element is a folio report.

Parameters
conductor

Definition at line 1065 of file dynamicelementtextitem.cpp.

References setPotentialConductor().

Referenced by itemChange().

◆ conductorWasRemoved()

void DynamicElementTextItem::conductorWasRemoved ( Conductor conductor)
private

DynamicElementTextItem::conductorWasRemoved Function only use when parent element is a folio report.

Parameters
conductor

Definition at line 1076 of file dynamicelementtextitem.cpp.

References conductorPropertiesChanged(), m_watched_conductor, Conductor::propertiesChange(), and setPotentialConductor().

Referenced by itemChange().

◆ elementInfoChanged()

void DynamicElementTextItem::elementInfoChanged ( )
private

◆ elementUseForInfo()

Element * DynamicElementTextItem::elementUseForInfo ( ) const

DynamicElementTextItem::elementUseForInfo.

Returns
a pointer to the element we must use for the variable information. If this text is owned by a simple element, the simple element is returned, this is the same element returned by the function parentElement(). If this text is owned by a master element, the master element is returned, this is the same element returned by the function parentElement(). If this text is owned by a report element, the report element is returned, this is the same element returned by the function parentElement(). If this text is owned by a terminal element, the terminal element is returned, this is the same element returned by the function parentElement(). If this text is owned by a slave element, we return the master element set as master of the parent slave element, if the parent slave is not linked to a master, this function return a nullptr. If this text have no parent element, return nullptr

Definition at line 255 of file dynamicelementtextitem.cpp.

References Element::linkedElements(), Element::linkType(), Element::Master, Element::NextReport, parentElement(), Element::PreviousReport, Element::Simple, Element::Slave, and Element::Terminale.

Referenced by DynamicTextItemDelegate::availableInfo(), elementInfoChanged(), DynamicElementTextModel::itemDataChanged(), DynamicElementTextModel::itemsForText(), masterChanged(), setCompositeText(), setInfoName(), DynamicTextItemDelegate::setModelData(), setTextFrom(), setupFormulaConnection(), and updateLabel().

◆ frame()

bool DynamicElementTextItem::frame ( ) const

Referenced by setFrame().

◆ frameChanged

void DynamicElementTextItem::frameChanged ( bool  frame)
signal

◆ fromXml()

void DynamicElementTextItem::fromXml ( const QDomElement &  dom_elmt)
overridevirtual

◆ hoverEnterEvent()

void DynamicElementTextItem::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

DynamicElementTextItem::hoverEnterEvent If the parent element of this text is a folio report or a slave element, the element is linked and the text display the variable "label" we set the text blue for signal the user that the text act like a link when we double click on.

Parameters
event

Definition at line 611 of file dynamicelementtextitem.cpp.

References Element::AllReport, DiagramTextItem::color(), CompositeText, ElementInfo, DiagramTextItem::hoverEnterEvent(), m_composite_text, m_info_name, m_other_report, m_text_from, m_user_color, and parentElement().

◆ hoverLeaveEvent()

void DynamicElementTextItem::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

◆ infoName()

QString DynamicElementTextItem::infoName ( ) const

◆ infoNameChanged

void DynamicElementTextItem::infoNameChanged ( QString  info)
signal

◆ itemChange()

QVariant DynamicElementTextItem::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
overrideprotected

◆ masterChanged()

void DynamicElementTextItem::masterChanged ( )
private

DynamicElementTextItem::masterChanged This function is only use when the parent element is a slave. Call when the master element linked to the parent slave element of this text change.

Definition at line 808 of file dynamicelementtextitem.cpp.

References CompositeText, ElementInfo, Element::elementInfoChange(), elementInfoChanged(), elementUseForInfo(), m_master_element, m_text_from, and updateXref().

Referenced by itemChange().

◆ mouseDoubleClickEvent()

void DynamicElementTextItem::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

DynamicElementTextItem::mouseDoubleClickEvent Reimplemented functions, for add extra feature when this text is owned by a slave. In this case if the parent slave element is linked to a master, and this text display the label of the master (both if the 'text from' is 'element info' or 'composite text') the QGraphicsView go to master and select it.

Parameters
event

Definition at line 598 of file dynamicelementtextitem.cpp.

References DiagramTextItem::mouseDoubleClickEvent(), and zoomToLinkedElement().

◆ mouseMoveEvent()

void DynamicElementTextItem::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

◆ mousePressEvent()

void DynamicElementTextItem::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

◆ mouseReleaseEvent()

void DynamicElementTextItem::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

DynamicElementTextItem::mouseReleaseEvent.

Parameters
event

Definition at line 579 of file dynamicelementtextitem.cpp.

References m_parent_element.

◆ paint()

void DynamicElementTextItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
overrideprotected

◆ parentElement()

Element * DynamicElementTextItem::parentElement ( ) const

DynamicElementTextItem::ParentElement.

Returns
a pointer to the parent element. Note the pointer can be null. Note that the text can return a parent element, even if the text belong to a group of this same element.

Definition at line 224 of file dynamicelementtextitem.cpp.

References m_parent_element.

Referenced by DynamicTextItemDelegate::availableInfo(), DeleteQGraphicsItemCommand::DeleteQGraphicsItemCommand(), ElementPropertiesWidget::ElementPropertiesWidget(), elementUseForInfo(), hoverEnterEvent(), mouseMoveEvent(), DeleteQGraphicsItemCommand::redo(), reportChanged(), reportFormulaChanged(), ElementPropertiesWidget::setDynamicText(), setPotentialConductor(), CompositeTextEditDialog::setUpComboBox(), and zoomToLinkedElement().

◆ parentGroup()

ElementTextItemGroup * DynamicElementTextItem::parentGroup ( ) const

◆ plainTextChanged

void DynamicElementTextItem::plainTextChanged ( )
signal

◆ refreshLabelConnection()

void DynamicElementTextItem::refreshLabelConnection ( )

DynamicElementTextItem::refreshLabelConnection Refresh the connection of this text when the source of text is label, or composite text, with a variable %{label}.

Definition at line 290 of file dynamicelementtextitem.cpp.

References Element::AllReport, CompositeText, ElementInfo, m_composite_text, m_info_name, m_parent_element, m_text_from, setupFormulaConnection(), updateLabel(), updateReportFormulaConnection(), and updateReportText().

◆ removeConnectionForReportFormula()

void DynamicElementTextItem::removeConnectionForReportFormula ( const QString &  formula)
private

◆ reportChanged()

void DynamicElementTextItem::reportChanged ( )
private

◆ reportFormulaChanged()

void DynamicElementTextItem::reportFormulaChanged ( )
private

◆ reportReplacedCompositeText()

QString DynamicElementTextItem::reportReplacedCompositeText ( ) const
private

DynamicElementTextItem::reportReplacedCompositeText This function is only used when the parent element of this text is a report element.

Returns
the composite text with the variable replaced by the real value. If the parent element of this text is not a folio report, return a default QString.

Definition at line 1163 of file dynamicelementtextitem.cpp.

References Element::AllReport, QetGraphicsItem::diagram(), autonum::AssignVariables::formulaToLabel(), m_composite_text, m_other_report, m_parent_element, m_report_formula, m_watched_conductor, and Element::rSequenceStruct().

Referenced by conductorPropertiesChanged(), and updateReportText().

◆ sceneEventFilter()

bool DynamicElementTextItem::sceneEventFilter ( QGraphicsItem *  watched,
QEvent *  event 
)
overrideprotected

Definition at line 741 of file dynamicelementtextitem.cpp.

References m_slave_Xref_item, and zoomToLinkedElement().

◆ setCompositeText()

void DynamicElementTextItem::setCompositeText ( const QString &  text)

◆ setConnectionForReportFormula()

void DynamicElementTextItem::setConnectionForReportFormula ( const QString &  formula)
private

◆ setFrame()

void DynamicElementTextItem::setFrame ( const bool  frame)

Definition at line 503 of file dynamicelementtextitem.cpp.

References frame(), frameChanged(), and m_frame.

Referenced by fromXml(), and Element::fromXml().

◆ setInfoName()

void DynamicElementTextItem::setInfoName ( const QString &  info_name)

◆ setPlainText()

void DynamicElementTextItem::setPlainText ( const QString &  text)

◆ setPotentialConductor()

void DynamicElementTextItem::setPotentialConductor ( )
private

DynamicElementTextItem::setPotentialConductor This function is only used when the parent element of this text is a report element Get a conductor in the potential of the parent report.

Definition at line 1091 of file dynamicelementtextitem.cpp.

References Element::AllReport, conductorPropertiesChanged(), m_other_report, m_watched_conductor, parentElement(), Conductor::propertiesChange(), and Element::terminals().

Referenced by conductorWasAdded(), conductorWasRemoved(), itemChange(), and reportChanged().

◆ setText()

void DynamicElementTextItem::setText ( const QString &  text)

DynamicElementTextItem::setText Set the text of this text.

Parameters
formula

Definition at line 384 of file dynamicelementtextitem.cpp.

References m_text, m_text_from, setPlainText(), text(), textChanged(), and UserText.

Referenced by DynamicElementTextItem(), fromXml(), and Element::parseInput().

◆ setTextFrom()

void DynamicElementTextItem::setTextFrom ( DynamicElementTextItem::TextFrom  text_from)

◆ setTextWidth()

void DynamicElementTextItem::setTextWidth ( qreal  width)

Definition at line 1362 of file dynamicelementtextitem.cpp.

References m_text_width, and textWidthChanged().

Referenced by DynamicElementTextItem(), fromXml(), and Element::fromXml().

◆ setupFormulaConnection()

void DynamicElementTextItem::setupFormulaConnection ( )
private

◆ text()

QString DynamicElementTextItem::text ( ) const

◆ textChanged

void DynamicElementTextItem::textChanged ( QString  text)
signal

◆ textFrom()

DynamicElementTextItem::TextFrom DynamicElementTextItem::textFrom ( ) const

Referenced by reportChanged().

◆ textFromChanged

void DynamicElementTextItem::textFromChanged ( DynamicElementTextItem::TextFrom  text_from)
signal

◆ textFromMetaEnum()

QMetaEnum DynamicElementTextItem::textFromMetaEnum ( )
static

DynamicElementTextItem::textFromMetaEnum.

Returns
The QMetaEnum of the enum TextFrom

Definition at line 72 of file dynamicelementtextitem.cpp.

Referenced by PartDynamicTextField::fromXml(), fromXml(), PartDynamicTextField::toXml(), and toXml().

◆ textWidthChanged

void DynamicElementTextItem::textWidthChanged ( qreal  width)
signal

◆ toXml()

QDomElement DynamicElementTextItem::toXml ( QDomDocument &  dom_doc) const
overridevirtual

◆ type()

int DynamicElementTextItem::type ( ) const
inlineoverride

Definition at line 61 of file dynamicelementtextitem.h.

References Type.

◆ updateLabel()

void DynamicElementTextItem::updateLabel ( )
private

DynamicElementTextItem::updateLabel Update the displayed text, when this dynamic text is based on the label of the parent element. This function is notably use when the label itself is based from a formula. If this dynamic text isn't based on label, this function do nothing.

Definition at line 1037 of file dynamicelementtextitem.cpp.

References CompositeText, QetGraphicsItem::diagram(), ElementInfo, Element::elementInformations(), elementUseForInfo(), autonum::AssignVariables::formulaToLabel(), m_composite_text, m_info_name, m_text_from, autonum::AssignVariables::replaceVariable(), Element::rSequenceStruct(), setPlainText(), and DiagramContext::value().

Referenced by refreshLabelConnection(), setCompositeText(), setInfoName(), setTextFrom(), and setupFormulaConnection().

◆ updateReportFormulaConnection()

void DynamicElementTextItem::updateReportFormulaConnection ( )
private

◆ updateReportText()

void DynamicElementTextItem::updateReportText ( )
private

◆ updateXref()

void DynamicElementTextItem::updateXref ( )

◆ uuid()

QUuid DynamicElementTextItem::uuid ( ) const

Definition at line 515 of file dynamicelementtextitem.cpp.

References m_uuid.

Referenced by DynamicElementTextModel::mimeData().

◆ xmlTaggName()

static QString DynamicElementTextItem::xmlTaggName ( )
inlinestatic

◆ zoomToLinkedElement()

void DynamicElementTextItem::zoomToLinkedElement ( )
private

Friends And Related Function Documentation

◆ CompositeTextEditDialog

friend class CompositeTextEditDialog
friend

Definition at line 40 of file dynamicelementtextitem.h.

◆ DynamicTextItemDelegate

friend class DynamicTextItemDelegate
friend

Definition at line 39 of file dynamicelementtextitem.h.

◆ Element

friend class Element
friend

Definition at line 41 of file dynamicelementtextitem.h.

Member Data Documentation

◆ m_composite_text

QString DynamicElementTextItem::m_composite_text
private

◆ m_F_str

QString DynamicElementTextItem::m_F_str
private

◆ m_first_scene_change

bool DynamicElementTextItem::m_first_scene_change = true
private

Definition at line 153 of file dynamicelementtextitem.h.

Referenced by itemChange().

◆ m_formula_connection

QList<QMetaObject::Connection> DynamicElementTextItem::m_formula_connection
private

Definition at line 149 of file dynamicelementtextitem.h.

Referenced by clearFormulaConnection(), and setupFormulaConnection().

◆ m_frame

bool DynamicElementTextItem::m_frame = false
private

Definition at line 152 of file dynamicelementtextitem.h.

Referenced by paint(), setFrame(), and toXml().

◆ m_info_name

QString DynamicElementTextItem::m_info_name
private

◆ m_initial_position

QPointF DynamicElementTextItem::m_initial_position
private

Definition at line 157 of file dynamicelementtextitem.h.

Referenced by mouseMoveEvent().

◆ m_master_element

QPointer<Element> DynamicElementTextItem::m_master_element
private

Definition at line 137 of file dynamicelementtextitem.h.

Referenced by masterChanged(), updateXref(), and zoomToLinkedElement().

◆ m_other_report

QPointer<Element> DynamicElementTextItem::m_other_report
private

◆ m_parent_element

QPointer<Element> DynamicElementTextItem::m_parent_element
private

◆ m_report_formula

QString DynamicElementTextItem::m_report_formula
private

◆ m_report_formula_con

QMetaObject::Connection DynamicElementTextItem::m_report_formula_con
private

Definition at line 148 of file dynamicelementtextitem.h.

Referenced by itemChange(), and reportChanged().

◆ m_slave_Xref_item

QGraphicsTextItem* DynamicElementTextItem::m_slave_Xref_item = nullptr
private

◆ m_text

QString DynamicElementTextItem::m_text
private

Definition at line 141 of file dynamicelementtextitem.h.

Referenced by elementInfoChanged(), setText(), and setTextFrom().

◆ m_text_from

DynamicElementTextItem::TextFrom DynamicElementTextItem::m_text_from = UserText
private

◆ m_text_width

qreal DynamicElementTextItem::m_text_width = -1
private

Definition at line 156 of file dynamicelementtextitem.h.

Referenced by setPlainText(), setTextWidth(), and toXml().

◆ m_update_slave_Xref_connection

QList<QMetaObject::Connection> DynamicElementTextItem::m_update_slave_Xref_connection
private

Definition at line 149 of file dynamicelementtextitem.h.

Referenced by updateXref().

◆ m_user_color

QColor DynamicElementTextItem::m_user_color
private

Definition at line 151 of file dynamicelementtextitem.h.

Referenced by hoverEnterEvent(), hoverLeaveEvent(), and mousePressEvent().

◆ m_uuid

QUuid DynamicElementTextItem::m_uuid
private

Definition at line 147 of file dynamicelementtextitem.h.

Referenced by fromXml(), Element::parseDynamicText(), toXml(), and uuid().

◆ m_watched_conductor

QPointer<Conductor> DynamicElementTextItem::m_watched_conductor
private

◆ m_Xref_item

CrossRefItem* DynamicElementTextItem::m_Xref_item = nullptr
private

Definition at line 154 of file dynamicelementtextitem.h.

Referenced by setPlainText(), and updateXref().

Property Documentation

◆ compositeText

QString DynamicElementTextItem::compositeText
readwrite

◆ frame

bool DynamicElementTextItem::frame
readwrite

◆ infoName

QString DynamicElementTextItem::infoName
readwrite

◆ text

QString DynamicElementTextItem::text
readwrite

DynamicElementTextItem::text.

Returns
the text of this text

Definition at line 45 of file dynamicelementtextitem.h.

Referenced by DynamicElementTextModel::undoForEditedText().

◆ textFrom

DynamicElementTextItem::TextFrom DynamicElementTextItem::textFrom
readwrite

◆ textWidth

qreal DynamicElementTextItem::textWidth
readwrite

The documentation for this class was generated from the following files: