mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 06:20:53 +01:00
Update number and name support to terminal class
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2631 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -478,6 +478,8 @@ QDomElement Terminal::toXml(QDomDocument &doc) const {
|
||||
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 @@ bool Terminal::valideXml(QDomElement &terminal) {
|
||||
@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_)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user