summaryrefslogtreecommitdiff
path: root/client/widgets/checkbox.cc
diff options
context:
space:
mode:
authorsenator <senator>2007-10-02 10:09:37 +0000
committersenator <senator>2007-10-02 10:09:37 +0000
commit8dadd3a9f18b6d4e8884862658fe8a1d042f631c (patch)
treee28c16aafcfdb9c76cdc34aeb5c9b1cbdd5d9bbe /client/widgets/checkbox.cc
parent9910c8962ab813ab7d9a04609b689e1d9ae038e0 (diff)
misc minor changes for testing
Diffstat (limited to 'client/widgets/checkbox.cc')
-rw-r--r--client/widgets/checkbox.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/client/widgets/checkbox.cc b/client/widgets/checkbox.cc
index 1bb1cfe..3c73235 100644
--- a/client/widgets/checkbox.cc
+++ b/client/widgets/checkbox.cc
@@ -31,6 +31,14 @@ CheckBox::CheckBox(QDomNode node)
{
QDomElement elem = node.toElement();
+ if(elem.hasAttribute("width")) {
+ resize(elem.attribute("width").toInt(), height());
+ }
+
+ if(elem.hasAttribute("height")) {
+ resize(width(), elem.attribute("height").toInt());
+ }
+
if(elem.hasAttribute("caption")) {
setText(elem.attribute("caption"));
} else {
@@ -50,5 +58,9 @@ CheckBox::CheckBox(QDomNode node)
QString CheckBox::getValue()
{
- return "Checkbox";
+ if(checkState() == Qt::Unchecked) {
+ return "false";
+ } else if(checkState() == Qt::Checked) {
+ return "true";
+ }
}