18 #ifndef PARTDYNAMICTEXTFIELD_H 19 #define PARTDYNAMICTEXTFIELD_H 22 #include "QGraphicsTextItem" 48 void setProperty(const
char *
name, const QVariant &value)
override {QGraphicsTextItem::setProperty(
name, value);}
49 QVariant
property(
const char *
name)
const override {
return QGraphicsTextItem::property(
name);}
66 enum {
Type = UserType + 1110};
69 QString
name()
const override;
70 QString
xmlName()
const override;
71 static QString
xmlTaggName() {
return QString(
"dynamic_text");}
77 const QDomElement
toXml(QDomDocument &dom_doc)
const override;
78 void fromXml(
const QDomElement &dom_elmt)
override;
103 QVariant
itemChange(GraphicsItemChange change,
const QVariant &value)
override;
104 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
override;
128 #endif // PARTDYNAMICTEXTFIELD_H void setInfoName(const QString &info_name)
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
PartDynamicTextField::itemChange.
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
void setFont(const QFont &font)
DynamicElementTextItem::TextFrom textFrom() const
void setTextWidth(qreal width)
void handleUserTransformation(const QRectF &initial_selection_rect, const QRectF &new_selection_rect) override
PartDynamicTextField::handleUserTransformation.
void compositeTextChanged(QString text)
void colorChanged(QColor color)
void setColor(const QColor &color)
PartDynamicTextField::setColor.
static QString xmlTaggName()
Qt::Alignment alignment() const
QString xmlName() const override
The PartDynamicTextField class This class represents an editable dynamic text field which may be used...
void textChanged(QString text)
void fromTextFieldXml(const QDomElement &dom_element)
PartDynamicTextField::fromTextFieldXml Setup this text from the xml definition of a text field (The x...
void setAlignment(Qt::Alignment alignment)
void setTextFrom(DynamicElementTextItem::TextFrom text_from)
PartDynamicTextField::setTextFrom Set the final text is created from.
QRectF sceneGeometricRect() const override
void setText(const QString &text)
PartDynamicTextField::setText Set the text of this text.
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
PartDynamicTextField::mousePressEvent.
void fontChanged(QFont font)
void fromXml(const QDomElement &dom_elmt) override
PartDynamicTextField::fromXml.
void setCompositeText(const QString &text)
PartDynamicTextField::setCompositeText Set the composite text of this text item to ...
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
void alignmentChanged(Qt::Alignment alignment)
void textWidthChanged(qreal width)
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
PartDynamicTextField::mouseMoveEvent.
DynamicElementTextItem::TextFrom m_text_from
void taggChanged(QString tagg)
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
PartDynamicTextField::mouseReleaseEvent.
void textFromChanged(DynamicElementTextItem::TextFrom text_from)
void setPlainText(const QString &text)
int type() const override
void infoNameChanged(QString info)
void elementInfoChanged()
PartDynamicTextField::elementInfoChanged Used to up to date this text field, when the element informa...
PartDynamicTextField(QETElementEditor *editor, QGraphicsItem *parent=nullptr)
void setProperty(const char *name, const QVariant &value) override
PROPERTY.
QString compositeText() const
bool isUseless() const override
QVariant property(const char *name) const override
void frameChanged(bool frame)
void startUserTransformation(const QRectF &initial_selection_rect) override
PartDynamicTextField::startUserTransformation.
QString name() const override
Qt::Alignment m_alignment
const QDomElement toXml(QDomDocument &dom_doc) const override
PartDynamicTextField::toXml.
void setFrame(bool frame)