|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
18 #ifndef PARTDYNAMICTEXTFIELD_H
19 #define PARTDYNAMICTEXTFIELD_H
22 #include "QGraphicsTextItem"
49 void setProperty(
const char *
name,
const QVariant &value)
override {QGraphicsTextItem::setProperty(
name, value);}
50 QVariant
property(
const char *
name)
const override {
return QGraphicsTextItem::property(
name);}
67 enum {
Type = UserType + 1110};
70 QString
name()
const override;
71 QString
xmlName()
const override;
72 static QString
xmlTaggName() {
return QString(
"dynamic_text");}
78 const QDomElement
toXml(QDomDocument &dom_doc)
const override;
79 void fromXml(
const QDomElement &dom_elmt)
override;
104 QVariant
itemChange(GraphicsItemChange change,
const QVariant &value)
override;
105 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
override;
128 #endif // PARTDYNAMICTEXTFIELD_H
static QFont dynamicTextsItemFont(qreal=-1.0)
QETApp::dynamicTextsFont the default font of dynamic element text item.
Definition: qetapp.cpp:1169
bool m_block_alignment
Definition: partdynamictextfield.h:122
void compositeTextChanged(QString text)
void fromXml(const QDomElement &dom_elmt) override
PartDynamicTextField::fromXml.
Definition: partdynamictextfield.cpp:155
QRectF m_alignment_rect
Definition: partdynamictextfield.h:125
QString m_info_name
Definition: partdynamictextfield.h:116
QColor color
Definition: partdynamictextfield.h:41
QRectF sceneGeometricRect() const override
Definition: partdynamictextfield.h:74
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
Definition: partdynamictextfield.cpp:486
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
PartDynamicTextField::itemChange.
Definition: partdynamictextfield.cpp:468
QString text
Definition: partdynamictextfield.h:37
QString m_composite_text
Definition: partdynamictextfield.h:117
static QString xmlTaggName()
Definition: partdynamictextfield.h:72
QString name() const override
Definition: partdynamictextfield.cpp:52
void setFrame(bool frame)
Definition: partdynamictextfield.cpp:361
void elementInfoChanged()
PartDynamicTextField::elementInfoChanged Used to up to date this text field, when the element informa...
Definition: partdynamictextfield.cpp:535
qreal m_text_width
Definition: partdynamictextfield.h:123
DynamicElementTextItem::TextFrom textFrom
Definition: partdynamictextfield.h:38
virtual QUndoStack & undoStack() const
Definition: customelementpart.cpp:42
void setTextWidth(qreal width)
Definition: partdynamictextfield.cpp:371
void startUserTransformation(const QRectF &initial_selection_rect) override
PartDynamicTextField::startUserTransformation.
Definition: partdynamictextfield.cpp:67
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
PartDynamicTextField::mousePressEvent.
Definition: partdynamictextfield.cpp:437
void frameChanged(bool frame)
QString compositeText
Definition: partdynamictextfield.h:40
QString infoName
Definition: partdynamictextfield.h:39
QPointF m_origine_pos
Definition: partdynamictextfield.h:113
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
void fromTextFieldXml(const QDomElement &dom_element)
PartDynamicTextField::fromTextFieldXml Setup this text from the xml definition of a text field (The x...
Definition: partdynamictextfield.cpp:225
void finishAlignment()
Definition: partdynamictextfield.cpp:550
Qt::Alignment m_alignment
Definition: partdynamictextfield.h:124
void setAlignment(Qt::Alignment alignment)
Definition: partdynamictextfield.cpp:401
virtual void updateCurrentPartEditor() const
Definition: customelementpart.cpp:30
qreal correctAngle(const qreal &)
Definition: qet.cpp:545
void setPlainText(const QString &text)
Definition: partdynamictextfield.cpp:382
void textWidthChanged(qreal width)
The PartDynamicTextField class This class represents an editable dynamic text field which may be used...
Definition: partdynamictextfield.h:34
void alignmentChanged(Qt::Alignment alignment)
void setTextFrom(DynamicElementTextItem::TextFrom text_from)
PartDynamicTextField::setTextFrom Set the final text is created from.
Definition: partdynamictextfield.cpp:272
QVariant property(const char *name) const override
Definition: partdynamictextfield.h:50
int type() const override
Definition: partdynamictextfield.h:68
@ CompositeText
Definition: dynamicelementtextitem.h:58
bool isUseless() const override
Definition: partdynamictextfield.h:73
QString xmlName() const override
Definition: partdynamictextfield.cpp:56
TextFrom
Definition: dynamicelementtextitem.h:55
@ UserText
Definition: dynamicelementtextitem.h:56
void elementInfoChanged()
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
PartDynamicTextField::mouseMoveEvent.
Definition: partdynamictextfield.cpp:424
QUuid m_uuid
Definition: partdynamictextfield.h:119
bool m_frame
Definition: partdynamictextfield.h:120
void setFont(const QFont &font)
Definition: partdynamictextfield.cpp:410
QPointF m_saved_point
Definition: partdynamictextfield.h:114
static QMetaEnum textFromMetaEnum()
DynamicElementTextItem::textFromMetaEnum.
Definition: dynamicelementtextitem.cpp:72
QIcon ro
Definition: qeticons.cpp:200
void fontChanged(QFont font)
The CustomElementPart class This abstract class represents a primitive of the visual representation o...
Definition: customelementpart.h:40
virtual ElementScene * elementScene() const
Definition: customelementpart.cpp:37
DynamicElementTextItem::TextFrom m_text_from
Definition: partdynamictextfield.h:118
QList< QPointF > mapPoints(const QRectF &, const QRectF &, const QList< QPointF > &)
Definition: customelementpart.cpp:69
qreal textWidth
Definition: partdynamictextfield.h:43
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
QFont font
Definition: partdynamictextfield.h:45
bool m_first_add
Definition: partdynamictextfield.h:121
void setText(const QString &text)
PartDynamicTextField::setText Set the text of this text.
Definition: partdynamictextfield.cpp:303
void taggChanged(QString tagg)
void setInfoName(const QString &info_name)
Definition: partdynamictextfield.cpp:309
QString m_text
Definition: partdynamictextfield.h:115
Qt::Alignment alignment
Definition: partdynamictextfield.h:44
PartDynamicTextField(QETElementEditor *editor, QGraphicsItem *parent=nullptr)
Definition: partdynamictextfield.cpp:27
void prepareAlignment()
Definition: partdynamictextfield.cpp:546
void colorChanged(QColor color)
void textFromChanged(DynamicElementTextItem::TextFrom text_from)
void setCompositeText(const QString &text)
PartDynamicTextField::setCompositeText Set the composite text of this text item to text.
Definition: partdynamictextfield.cpp:329
void setProperty(const char *name, const QVariant &value) override
PROPERTY.
Definition: partdynamictextfield.h:49
@ Type
Definition: partdynamictextfield.h:67
The QPropertyUndoCommand class This undo command manage QProperty of a QObject. This undo command can...
Definition: qpropertyundocommand.h:34
bool frame
Definition: partdynamictextfield.h:42
void textChanged(QString text)
QIcon tr
Definition: qeticons.cpp:206
@ ElementInfo
Definition: dynamicelementtextitem.h:57
void handleUserTransformation(const QRectF &initial_selection_rect, const QRectF &new_selection_rect) override
PartDynamicTextField::handleUserTransformation.
Definition: partdynamictextfield.cpp:79
Definition: qetelementeditor.h:33
const QDomElement toXml(QDomDocument &dom_doc) const override
PartDynamicTextField::toXml.
Definition: partdynamictextfield.cpp:93
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
PartDynamicTextField::mouseReleaseEvent.
Definition: partdynamictextfield.cpp:448
void setColor(const QColor &color)
PartDynamicTextField::setColor.
Definition: partdynamictextfield.cpp:348
void infoNameChanged(QString info)