copy all toXML() from master commit 4b82c3a0c4 into the current branch, because the new concept will be used only for user properties

This commit is contained in:
Martin Marmsoler
2021-03-07 10:09:45 +01:00
parent 058824f29a
commit 5d3710c4b2
26 changed files with 267 additions and 294 deletions

View File

@@ -760,15 +760,12 @@ QList<Conductor *> Terminal::conductors() const
*/
void Terminal::toXmlPriv(QDomElement &qdo) const
{
qdo.appendChild(QETXML::createXmlProperty("number", number_terminal_));
qdo.appendChild(QETXML::createXmlProperty("nameHidden", name_terminal_hidden));
// for backward compatibility
qdo.setAttribute("x", QString("%1").arg(dock_elmt_.x()));
qdo.setAttribute("y", QString("%1").arg(dock_elmt_.y()));
// end for backward compatibility
// Do not store terminal data in its own child
// Bad hack. The problem is that in the diagrams the terminal is described by the position and in the Collection by the dock.
QPointF tempPos = d->m_pos;
d->m_pos = dock_elmt_;
d->toXmlPriv(qdo); // TerminalData
d->m_pos = tempPos;
qdo.setAttribute("orientation", d->m_orientation);
}
/**