From ce667bf4b2f3de7aab677ac7e7f23bc72d3db80f Mon Sep 17 00:00:00 2001 From: senator Date: Wed, 25 Jul 2007 09:11:31 +0000 Subject: migrated all widgets to use QDomNodes; Implemented the getName functionality --- client/widgets/window.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'client/widgets/window.cc') 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() -- cgit v1.2.3