mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-16 23:20:00 +01:00
Minor: Add element prefix to project file
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4575 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -403,6 +403,9 @@ bool Element::fromXml(QDomElement &e, QHash<int, Terminal *> &table_id_adr, bool
|
|||||||
//uuid of this element
|
//uuid of this element
|
||||||
uuid_= QUuid(e.attribute("uuid", QUuid::createUuid().toString()));
|
uuid_= QUuid(e.attribute("uuid", QUuid::createUuid().toString()));
|
||||||
|
|
||||||
|
//load prefix
|
||||||
|
m_prefix = e.attribute("prefix");
|
||||||
|
|
||||||
//load informations
|
//load informations
|
||||||
m_element_informations.fromXml(e.firstChildElement("elementInformations"), "elementInformation");
|
m_element_informations.fromXml(e.firstChildElement("elementInformations"), "elementInformation");
|
||||||
|
|
||||||
@@ -438,6 +441,8 @@ QDomElement Element::toXml(QDomDocument &document, QHash<Terminal *, int> &table
|
|||||||
element.setAttribute("type", typeId());
|
element.setAttribute("type", typeId());
|
||||||
// uuid
|
// uuid
|
||||||
element.setAttribute("uuid", uuid().toString());
|
element.setAttribute("uuid", uuid().toString());
|
||||||
|
// prefix
|
||||||
|
element.setAttribute("prefix", m_prefix);
|
||||||
|
|
||||||
// position, selection et orientation
|
// position, selection et orientation
|
||||||
element.setAttribute("x", QString("%1").arg(pos().x()));
|
element.setAttribute("x", QString("%1").arg(pos().x()));
|
||||||
|
|||||||
Reference in New Issue
Block a user