Element editor : dynamic text item can be added directly from the element editor (WIP)

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5046 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2017-09-25 17:44:02 +00:00
parent 0c01bc4406
commit aa5241896c
17 changed files with 1355 additions and 249 deletions

View File

@@ -532,6 +532,12 @@ bool Element::fromXml(QDomElement &e, QHash<int, Terminal *> &table_id_adr, bool
} else {
applyRotation(90*read_ori);
}
//Befor load the dynamic text field,
//we remove the dynamic text field created from the description of this element, to avoid doublons.
for(DynamicElementTextItem *deti : m_dynamic_text_list)
delete deti;
m_dynamic_text_list.clear();
//Dynamic texts
for (QDomElement qde : QET::findInDomElement(e, "dynamic_texts", DynamicElementTextItem::xmlTaggName()))
@@ -626,7 +632,7 @@ QDomElement Element::toXml(QDomDocument &document, QHash<Terminal *, int> &table
m_element_informations.toXml(infos, "elementInformation");
element.appendChild(infos);
}
//Dynamic texts
QDomElement dyn_text = document.createElement("dynamic_texts");
for (DynamicElementTextItem *deti : m_dynamic_text_list)