summaryrefslogtreecommitdiff
path: root/client/widgets/radiobutton.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/radiobutton.cc
parentb74d14e7e8625ce1a148105f69e3406f7d88ecd6 (diff)
Added common stuff in central file. Fixed help text reformatting.
Diffstat (limited to 'client/widgets/radiobutton.cc')
-rw-r--r--client/widgets/radiobutton.cc21
1 files changed, 4 insertions, 17 deletions
diff --git a/client/widgets/radiobutton.cc b/client/widgets/radiobutton.cc
index 9e04e07..6646f59 100644
--- a/client/widgets/radiobutton.cc
+++ b/client/widgets/radiobutton.cc
@@ -27,34 +27,21 @@
#include "radiobutton.h"
#include <QRadioButton>
+#include "common.h"
+
RadioButton::RadioButton(QDomNode &node)
: QRadioButton()
{
- QDomElement elem = node.toElement();
-
- if(elem.hasAttribute("width")) {
- resize(elem.attribute("width").toInt(), height());
- }
+ setCommonAttributes(this, node);
- if(elem.hasAttribute("height")) {
- resize(width(), elem.attribute("height").toInt());
- }
-
- if(elem.hasAttribute("help")) {
- setToolTip(elem.attribute("help"));
- }
+ QDomElement elem = node.toElement();
if(elem.hasAttribute("caption")) {
setText(elem.attribute("caption"));
- } else {
- setText("");
}
if(elem.hasAttribute("value")) {
value = elem.attribute("value");
- } else {
- printf("XML ERROR!!! Radiobutton item has no value\n");
- value = "none";
}
}