diff options
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() |