summaryrefslogtreecommitdiff
path: root/client/widgets/checkbox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets/checkbox.cc')
-rw-r--r--client/widgets/checkbox.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/client/widgets/checkbox.cc b/client/widgets/checkbox.cc
index ae9f143..33cd9d1 100644
--- a/client/widgets/checkbox.cc
+++ b/client/widgets/checkbox.cc
@@ -26,9 +26,17 @@
*/
#include "checkbox.h"
-CheckBox::CheckBox(QWidget *parent) : QCheckBox(parent)
+CheckBox::CheckBox(QDomNode node) : QCheckBox()
{
- setText("Checkbox");
+ QDomElement elem = node.toElement();
+ widget_name = elem.attribute("name");
+ setText(elem.attribute("caption"));
+
+ if(elem.attribute("value") == "true") {
+ setChecked(true);
+ } else if (elem.attribute("value") == "false") {
+ setChecked(false);
+ }
}
QString CheckBox::getValue()