summaryrefslogtreecommitdiff
path: root/client/widgets/radiobuttons.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets/radiobuttons.cc')
-rw-r--r--client/widgets/radiobuttons.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/client/widgets/radiobuttons.cc b/client/widgets/radiobuttons.cc
index dc79831..ccc5506 100644
--- a/client/widgets/radiobuttons.cc
+++ b/client/widgets/radiobuttons.cc
@@ -75,10 +75,22 @@ RadioButtons::RadioButtons(QDomNode node)
}
+bool RadioButtons::isValid()
+{
+ QVector< RadioButton* >::iterator i;
+ for (i = radiobutton_list.begin(); i != radiobutton_list.end(); ++i) {
+ RadioButton *widget = *i;
+ if(widget->isChecked()) {
+ return true;
+ }
+ }
+ return false;
+}
+
QString RadioButtons::getValue()
{
QVector< RadioButton* >::iterator i;
- QString value = "none";
+ QString value;
for (i = radiobutton_list.begin(); i != radiobutton_list.end(); ++i) {
RadioButton *widget = *i;
if(widget->isChecked()) {