[qet] [2631] Update number and name support to terminal class |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 2631
Author: cfdev
Date: 2013-11-21 17:24:55 +0100 (Thu, 21 Nov 2013)
Log Message:
-----------
Update number and name support to terminal class
Modified Paths:
--------------
trunk/sources/terminal.cpp
Modified: trunk/sources/terminal.cpp
===================================================================
--- trunk/sources/terminal.cpp 2013-11-21 09:49:18 UTC (rev 2630)
+++ trunk/sources/terminal.cpp 2013-11-21 16:24:55 UTC (rev 2631)
@@ -478,6 +478,8 @@
qdo.setAttribute("y", QString("%1").arg(dock_elmt_.y()));
qdo.setAttribute("orientation", ori_);
qdo.setAttribute("number", number_terminal_);
+ qdo.setAttribute("name", name_terminal_);
+ qdo.setAttribute("nameHidden", name_terminal_hidden);
return(qdo);
}
@@ -523,10 +525,13 @@
@return true si la borne "se reconnait" (memes coordonnes, meme orientation), false sinon
*/
bool Terminal::fromXml(QDomElement &terminal) {
+ number_terminal_ = terminal.attribute("number");
+ name_terminal_ = terminal.attribute("name");
+ name_terminal_hidden = terminal.attribute("nameHidden").toInt();
return (
qFuzzyCompare(terminal.attribute("x").toDouble(), dock_elmt_.x()) &&
qFuzzyCompare(terminal.attribute("y").toDouble(), dock_elmt_.y()) &&
- terminal.attribute("orientation").toInt() == ori_
+ (terminal.attribute("orientation").toInt() == ori_)
);
}