18#ifndef PARTDYNAMICTEXTFIELD_H
19#define PARTDYNAMICTEXTFIELD_H
21#include "../../qetgraphicsitem/dynamicelementtextitem.h"
22#include "QGraphicsTextItem"
50 void setProperty(const
char *
name, const QVariant &value)
override {QGraphicsTextItem::setProperty(
name, value);}
51 QVariant
property(
const char *
name)
const override {
return QGraphicsTextItem::property(
name);}
69 enum {
Type = UserType + 1110};
72 QString
name()
const override;
73 QString
xmlName()
const override;
74 static QString
xmlTaggName() {
return QString(
"dynamic_text");}
80 const QDomElement
toXml(QDomDocument &dom_doc)
const override;
81 void fromXml(
const QDomElement &dom_elmt)
override;
108 QVariant
itemChange(GraphicsItemChange change,
const QVariant &value)
override;
109 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
override;
The CustomElementPart class This abstract class represents a primitive of the visual representation o...
Definition customelementpart.h:40
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
Definition dynamicelementtextitem.h:40
TextFrom
Definition dynamicelementtextitem.h:57
@ UserText
Definition dynamicelementtextitem.h:58
The PartDynamicTextField class This class represents an editable dynamic text field which may be used...
Definition partdynamictextfield.h:34
qreal textWidth
Definition partdynamictextfield.h:43
QString compositeText
Definition partdynamictextfield.h:40
void fromTextFieldXml(const QDomElement &dom_element)
PartDynamicTextField::fromTextFieldXml Setup this text from the xml definition of a text field (The x...
Definition partdynamictextfield.cpp:240
QString infoName
Definition partdynamictextfield.h:39
QVariant property(const char *name) const override
Definition partdynamictextfield.h:51
Qt::Alignment alignment
Definition partdynamictextfield.h:44
QFont font
Definition partdynamictextfield.h:45
void alignmentChanged(Qt::Alignment alignment)
static QString xmlTaggName()
Definition partdynamictextfield.h:74
void colorChanged(QColor color)
QPointF m_origine_pos
Definition partdynamictextfield.h:117
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
PartDynamicTextField::mouseMoveEvent.
Definition partdynamictextfield.cpp:459
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
Definition partdynamictextfield.cpp:521
void setCompositeText(const QString &text)
PartDynamicTextField::setCompositeText Set the composite text of this text item to text.
Definition partdynamictextfield.cpp:346
bool isUseless() const override
Definition partdynamictextfield.h:75
void infoNameChanged(QString info)
void elementInfoChanged()
PartDynamicTextField::elementInfoChanged Used to up to date this text field, when the element informa...
Definition partdynamictextfield.cpp:570
void handleUserTransformation(const QRectF &initial_selection_rect, const QRectF &new_selection_rect) override
PartDynamicTextField::handleUserTransformation.
Definition partdynamictextfield.cpp:82
QString name() const override
Definition partdynamictextfield.cpp:53
void setAlignment(Qt::Alignment alignment)
Definition partdynamictextfield.cpp:421
void setText(const QString &text)
PartDynamicTextField::setText Set the text of this text.
Definition partdynamictextfield.cpp:320
QUuid m_uuid
Definition partdynamictextfield.h:123
void prepareAlignment()
Definition partdynamictextfield.cpp:582
DynamicElementTextItem::TextFrom textFrom
Definition partdynamictextfield.h:38
DynamicElementTextItem::TextFrom m_text_from
Definition partdynamictextfield.h:122
bool keepVisualRotation
Definition partdynamictextfield.h:46
void setTextWidth(qreal width)
Definition partdynamictextfield.cpp:391
void keepVisualRotationChanged(bool keep)
int type() const override
Definition partdynamictextfield.h:70
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
PartDynamicTextField::mousePressEvent.
Definition partdynamictextfield.cpp:472
QString xmlName() const override
Definition partdynamictextfield.cpp:58
qreal m_text_width
Definition partdynamictextfield.h:128
void setFrame(bool frame)
Definition partdynamictextfield.cpp:380
bool m_keep_visual_rotation
Definition partdynamictextfield.h:127
void taggChanged(QString tagg)
void setFont(const QFont &font)
Definition partdynamictextfield.cpp:431
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
PartDynamicTextField::itemChange.
Definition partdynamictextfield.cpp:503
void startUserTransformation(const QRectF &initial_selection_rect) override
PartDynamicTextField::startUserTransformation.
Definition partdynamictextfield.cpp:70
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
PartDynamicTextField::mouseReleaseEvent.
Definition partdynamictextfield.cpp:483
QString m_text
Definition partdynamictextfield.h:119
void textWidthChanged(qreal width)
void setPlainText(const QString &text)
Definition partdynamictextfield.cpp:402
void setKeepVisualRotation(const bool &keep)
Definition partdynamictextfield.cpp:441
void textFromChanged(DynamicElementTextItem::TextFrom text_from)
bool m_first_add
Definition partdynamictextfield.h:125
const QDomElement toXml(QDomDocument &dom_doc) const override
PartDynamicTextField::toXml.
Definition partdynamictextfield.cpp:96
void compositeTextChanged(QString text)
QString m_info_name
Definition partdynamictextfield.h:120
void setTextFrom(DynamicElementTextItem::TextFrom text_from)
PartDynamicTextField::setTextFrom Set the final text is created from.
Definition partdynamictextfield.cpp:288
QRectF m_alignment_rect
Definition partdynamictextfield.h:130
void setProperty(const char *name, const QVariant &value) override
PROPERTY.
Definition partdynamictextfield.h:50
QRectF sceneGeometricRect() const override
Definition partdynamictextfield.h:76
bool m_block_alignment
Definition partdynamictextfield.h:126
void textChanged(QString text)
Qt::Alignment m_alignment
Definition partdynamictextfield.h:129
void finishAlignment()
Definition partdynamictextfield.cpp:587
void fontChanged(QFont font)
QString text
Definition partdynamictextfield.h:37
@ Type
Definition partdynamictextfield.h:69
void fromXml(const QDomElement &dom_elmt) override
PartDynamicTextField::fromXml.
Definition partdynamictextfield.cpp:160
QString m_composite_text
Definition partdynamictextfield.h:121
bool m_frame
Definition partdynamictextfield.h:124
bool frame
Definition partdynamictextfield.h:42
void setColor(const QColor &color)
PartDynamicTextField::setColor.
Definition partdynamictextfield.cpp:366
void frameChanged(bool frame)
QPointF m_saved_point
Definition partdynamictextfield.h:118
QColor color
Definition partdynamictextfield.h:41
void setInfoName(const QString &info_name)
Definition partdynamictextfield.cpp:326
Definition qetelementeditor.h:39