diff options
author | senator <senator> | 2007-07-25 09:11:31 +0000 |
---|---|---|
committer | senator <senator> | 2007-07-25 09:11:31 +0000 |
commit | ce667bf4b2f3de7aab677ac7e7f23bc72d3db80f (patch) | |
tree | 760a18ca48e59274553ca6c211c08770f031ad56 /client/widgets/window.cc | |
parent | 22de7bf19fb6fcce8d11c0e01afdfafa2a8c00d6 (diff) |
migrated all widgets to use QDomNodes; Implemented the getName functionality
Diffstat (limited to 'client/widgets/window.cc')
-rw-r--r-- | client/widgets/window.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/client/widgets/window.cc b/client/widgets/window.cc index 657b62c..95f01a6 100644 --- a/client/widgets/window.cc +++ b/client/widgets/window.cc @@ -28,6 +28,25 @@ Window::Window(QDomNode node) : QWidget(NULL) { + QDomElement elem = node.toElement(); + + if(elem.hasAttribute("name")) { + widget_name = elem.attribute("name"); + } else { + printf("ERROR!! Widget has no name...\n"); + } + + if(elem.hasAttribute("width")) { + setMinimumWidth(elem.attribute("width").toInt()); + } + + if(elem.hasAttribute("height")) { + setMinimumHeight(elem.attribute("height").toInt()); + } + + if(elem.hasAttribute("caption")) { + setWindowTitle(elem.attribute("caption")); + } } QString Window::getValue() |