From 477c9fd7f038cd43207c8634d53d0949814ecb4c Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 28 Aug 2008 14:13:48 +0000 Subject: Added common stuff in central file. Fixed help text reformatting. --- client/widgets/checkbox.cc | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'client/widgets/checkbox.cc') 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() -- cgit v1.2.3