From f5bb02dc533f136311682e8801c2d9834e3be691 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 3 Dec 2008 08:46:12 +0000 Subject: Fixed onchange in altcombobox and checkbox. --- client/widgets/altcombobox.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'client/widgets/altcombobox.cc') 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); -- cgit v1.2.3