summaryrefslogtreecommitdiff
path: root/client/widgets/radiobuttons.cc
diff options
context:
space:
mode:
authorsenator <senator>2008-03-24 13:33:35 +0000
committersenator <senator>2008-03-24 13:33:35 +0000
commit917aea688614bd29568f7eb37efe8cbd2620b25c (patch)
tree568937b1a05890f5780500e5ae0696bd55cb1809 /client/widgets/radiobuttons.cc
parent2e87c4608a9fb888fd7669756d8cb457ac305f71 (diff)
Fixed isValid for combobox and radiobuttons
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()) {