summaryrefslogtreecommitdiff
path: root/client/widgets/radiobutton.cc
diff options
context:
space:
mode:
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";
}
}