summaryrefslogtreecommitdiff
path: root/client/widgets/altcombobox.cc
diff options
context:
space:
mode:
authordeva <deva>2008-12-03 08:46:12 +0000
committerdeva <deva>2008-12-03 08:46:12 +0000
commitf5bb02dc533f136311682e8801c2d9834e3be691 (patch)
treeb4d2207eb885860b58911c34be2c237a6e1b8b03 /client/widgets/altcombobox.cc
parent71649bf93bbbf871f48e1e94f4a42aa2534d5370 (diff)
Fixed onchange in altcombobox and checkbox.
Diffstat (limited to 'client/widgets/altcombobox.cc')
-rw-r--r--client/widgets/altcombobox.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/client/widgets/altcombobox.cc b/client/widgets/altcombobox.cc
index 1dc874f..e3b1eb7 100644
--- a/client/widgets/altcombobox.cc
+++ b/client/widgets/altcombobox.cc
@@ -109,6 +109,7 @@ AltComboBox::AltComboBox(QDomNode &node, MacroWindow *macrowindow)
}
connect(combobox, SIGNAL(currentIndexChanged(int)), this, SLOT(onValueChange(int)));
+ connect(combobox, SIGNAL(editTextChanged(const QString&)), this, SLOT(onValueChange(const QString&)));
layout()->setContentsMargins(0,0,0,0);
altframe->layout()->setContentsMargins(0,0,0,0);
@@ -166,6 +167,16 @@ void AltComboBox::onValueChange(int index)
}
}
+void AltComboBox::onValueChange(const QString &text)
+{
+ int index = combobox->findText(text);
+ if(index != -1 && combobox->itemData(index).toString() == altvalue) {
+ altframe->setEnabled(true);
+ } else {
+ altframe->setEnabled(false);
+ }
+}
+
void AltComboBox::enable()
{
setEnabled(true);