}
}
+void ModuleBase_ChoiceCtrl::setValue(const QString& theVal)
+{
+ switch (myType) {
+ case RadioButtons:
+ foreach (QAbstractButton* aBtn, myButtons->buttons()) {
+ aBtn->setChecked(aBtn->toolTip() == theVal);
+ }
+ break;
+ case ComboBox:
+ myCombo->setCurrentText(theVal);
+ break;
+ }
+}
+
+
void ModuleBase_ChoiceCtrl::setTooltip(QString theTip)
{
if (myType == ComboBox)
myCombo->addItems(theChoiceList);
}
}
+
+QString ModuleBase_ChoiceCtrl::textValue() const
+{
+ switch (myType) {
+ case RadioButtons:
+ return myButtons->checkedButton()->toolTip();
+ case ComboBox:
+ return myCombo->currentText();
+ }
+ return "";
+}