summaryrefslogtreecommitdiff
path: root/client/widgets/radiobuttons.cc
diff options
context:
space:
mode:
authordeva <deva>2008-08-28 14:13:48 +0000
committerdeva <deva>2008-08-28 14:13:48 +0000
commit477c9fd7f038cd43207c8634d53d0949814ecb4c (patch)
tree4d4f849c281aa4402c3f7bd95546c21ebe287e55 /client/widgets/radiobuttons.cc
parentb74d14e7e8625ce1a148105f69e3406f7d88ecd6 (diff)
Added common stuff in central file. Fixed help text reformatting.
Diffstat (limited to 'client/widgets/radiobuttons.cc')
-rw-r--r--client/widgets/radiobuttons.cc30
1 files changed, 4 insertions, 26 deletions
diff --git a/client/widgets/radiobuttons.cc b/client/widgets/radiobuttons.cc
index f0c9e8c..1987459 100644
--- a/client/widgets/radiobuttons.cc
+++ b/client/widgets/radiobuttons.cc
@@ -30,34 +30,13 @@
#include <QHBoxLayout>
#include <QVBoxLayout>
+#include "common.h"
+
RadioButtons::RadioButtons(QDomNode &node, MacroWindow *macrowindow)
: QFrame(), Widget(node, macrowindow)
{
- QDomElement elem = node.toElement();
-
- if(elem.hasAttribute("layout")) {
- if(elem.attribute("layout") == "hbox") {
- QHBoxLayout *layout = new QHBoxLayout();
- setLayout(layout);
- } else if (elem.attribute("layout") == "vbox") {
- QVBoxLayout *layout = new QVBoxLayout();
- setLayout(layout);
- }
- }
-
- if(elem.hasAttribute("width")) {
- //resize(elem.attribute("width").toInt(), height());
- setMinimumWidth(elem.attribute("width").toInt());
- }
-
- if(elem.hasAttribute("height")) {
- //resize(width(), elem.attribute("height").toInt());
- setMinimumHeight(elem.attribute("height").toInt());
- }
-
- if(elem.hasAttribute("help")) {
- setToolTip(elem.attribute("help"));
- }
+ setCommonAttributes(this, node);
+ setCommonLayout(this, node);
QDomNodeList children = node.childNodes();
@@ -72,7 +51,6 @@ RadioButtons::RadioButtons(QDomNode &node, MacroWindow *macrowindow)
}
layout()->setContentsMargins(0,0,0,0);
-
}
bool RadioButtons::isValid()