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.cc24
1 files changed, 4 insertions, 20 deletions
diff --git a/client/widgets/checkbox.cc b/client/widgets/checkbox.cc
index 1f089bb..f2af188 100644
--- a/client/widgets/checkbox.cc
+++ b/client/widgets/checkbox.cc
@@ -26,36 +26,20 @@
*/
#include "checkbox.h"
+#include "common.h"
+
CheckBox::CheckBox(QDomNode &node, MacroWindow *macrowindow)
: QCheckBox(), Widget(node, macrowindow)
{
- QDomElement elem = node.toElement();
+ setCommonAttributes(this, node);
- if(elem.hasAttribute("width")) {
- setMinimumWidth(elem.attribute("width").toInt());
- }
+ QDomElement elem = node.toElement();
- if(elem.hasAttribute("height")) {
- setMinimumHeight(elem.attribute("height").toInt());
- }
-
if(elem.hasAttribute("caption")) {
setText(elem.attribute("caption"));
}
-
- if(elem.hasAttribute("help")) {
- setToolTip(elem.attribute("help"));
- }
connect(this, SIGNAL(stateChanged(int)), this, SLOT(state_change()));
-
- /* // This is done later
- if(elem.hasAttribute("value")) {
- setValue(elem.attribute("value"));
- } else {
- setValue("false");
- }
- */
}
QString CheckBox::getValue()