diff options
author | senator <senator> | 2008-03-24 13:33:35 +0000 |
---|---|---|
committer | senator <senator> | 2008-03-24 13:33:35 +0000 |
commit | 917aea688614bd29568f7eb37efe8cbd2620b25c (patch) | |
tree | 568937b1a05890f5780500e5ae0696bd55cb1809 /client/widgets/radiobuttons.cc | |
parent | 2e87c4608a9fb888fd7669756d8cb457ac305f71 (diff) |
Fixed isValid for combobox and radiobuttons
Diffstat (limited to 'client/widgets/radiobuttons.cc')
-rw-r--r-- | client/widgets/radiobuttons.cc | 14 |
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()) { |