summaryrefslogtreecommitdiff
path: root/client/widgets/widget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets/widget.cc')
-rw-r--r--client/widgets/widget.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc
index 8bbb3a8..910d80b 100644
--- a/client/widgets/widget.cc
+++ b/client/widgets/widget.cc
@@ -26,6 +26,18 @@
*/
#include "widget.h"
+Widget::Widget(QDomNode node)
+{
+ QDomElement elem = node.toElement();
+
+ if(elem.hasAttribute("name")) {
+ widget_name = elem.attribute("name");
+ } else {
+ printf("XML ERROR!! Unnamed widget of type: %s\n",
+ elem.tagName().toStdString().c_str());
+ }
+}
+
QString Widget::getName()
{
return widget_name;