Element editor : When open a .elmt file in the element editor, the texts field are converted to dynamic text field, except for text field with tagg : label, function and tension/protocol.

In other words every text without tagg are converted.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5050 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2017-09-27 15:26:47 +00:00
parent 1933022b43
commit 8761d4768b
4 changed files with 51 additions and 15 deletions

View File

@@ -41,6 +41,9 @@ class PartDynamicTextField : public QGraphicsTextItem, public CustomElementPart
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
Q_PROPERTY(int fontSize READ fontSize WRITE setFontSize NOTIFY fontSizeChanged)
public:
static bool canImportFromTextField(const QDomElement &dom_element);
public:
///PROPERTY
void setProperty(const char *name, const QVariant &value) override {QGraphicsTextItem::setProperty(name, value);}
@@ -70,6 +73,7 @@ class PartDynamicTextField : public QGraphicsTextItem, public CustomElementPart
const QDomElement toXml(QDomDocument &dom_doc) const override;
void fromXml(const QDomElement &dom_elmt) override;
void fromTextFieldXml(const QDomElement &dom_element);
DynamicElementTextItem::TextFrom textFrom() const;
void setTextFrom (DynamicElementTextItem::TextFrom text_from);