mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-03 19:10:53 +01:00
Diagram editor : add 4 tools for edit the depth (Z value) of items.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5394 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -421,6 +421,7 @@ bool Element::fromXml(QDomElement &e, QHash<int, Terminal *> &table_id_adr, bool
|
||||
//Position and selection.
|
||||
//We directly call setPos from QGraphicsObject, because QetGraphicsItem will snap to grid
|
||||
QGraphicsObject::setPos(e.attribute("x").toDouble(), e.attribute("y").toDouble());
|
||||
setZValue(e.attribute("z", QString::number(this->zValue())).toDouble());
|
||||
setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
|
||||
|
||||
// orientation
|
||||
@@ -724,9 +725,10 @@ QDomElement Element::toXml(QDomDocument &document, QHash<Terminal *, int> &table
|
||||
element.appendChild(seq);
|
||||
|
||||
// position, selection et orientation
|
||||
element.setAttribute("x", QString("%1").arg(pos().x()));
|
||||
element.setAttribute("y", QString("%1").arg(pos().y()));
|
||||
element.setAttribute("orientation", QString("%1").arg(orientation()));
|
||||
element.setAttribute("x", QString::number(pos().x()));
|
||||
element.setAttribute("y", QString::number(pos().y()));
|
||||
element.setAttribute("z", QString::number(this->zValue()));
|
||||
element.setAttribute("orientation", QString::number(orientation()));
|
||||
|
||||
/* recupere le premier id a utiliser pour les bornes de cet element */
|
||||
int id_terminal = 0;
|
||||
|
||||
Reference in New Issue
Block a user