summaryrefslogtreecommitdiff
path: root/client/widgets/checkbox.cc
diff options
context:
space:
mode:
authorsenator <senator>2007-07-25 09:11:31 +0000
committersenator <senator>2007-07-25 09:11:31 +0000
commitce667bf4b2f3de7aab677ac7e7f23bc72d3db80f (patch)
tree760a18ca48e59274553ca6c211c08770f031ad56 /client/widgets/checkbox.cc
parent22de7bf19fb6fcce8d11c0e01afdfafa2a8c00d6 (diff)
migrated all widgets to use QDomNodes; Implemented the getName functionality
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()