|
|
@ -55,13 +55,13 @@
|
|
|
|
void kMandatoryFieldGroup::add(TQWidget *widget)
|
|
|
|
void kMandatoryFieldGroup::add(TQWidget *widget)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!widgets.contains(widget)) {
|
|
|
|
if (!widgets.contains(widget)) {
|
|
|
|
if (widget->inherits(TQCHECKBOX_OBJECT_NAME_STRING))
|
|
|
|
if (widget->inherits("TQCheckBox"))
|
|
|
|
connect((TQCheckBox*)widget->tqt_cast(TQCHECKBOX_OBJECT_NAME_STRING),
|
|
|
|
connect((TQCheckBox*)widget->tqt_cast("TQCheckBox"),
|
|
|
|
TQT_SIGNAL(clicked()),
|
|
|
|
TQT_SIGNAL(clicked()),
|
|
|
|
this, TQT_SLOT(changed()));
|
|
|
|
this, TQT_SLOT(changed()));
|
|
|
|
|
|
|
|
|
|
|
|
else if (widget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)) {
|
|
|
|
else if (widget->inherits("TQComboBox")) {
|
|
|
|
TQComboBox* combo = (TQComboBox*)widget->tqt_cast(TQCOMBOBOX_OBJECT_NAME_STRING);
|
|
|
|
TQComboBox* combo = (TQComboBox*)widget->tqt_cast("TQComboBox");
|
|
|
|
TQLineEdit* lineedit = combo->lineEdit();
|
|
|
|
TQLineEdit* lineedit = combo->lineEdit();
|
|
|
|
if(lineedit) {
|
|
|
|
if(lineedit) {
|
|
|
|
connect(lineedit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(changed()));
|
|
|
|
connect(lineedit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(changed()));
|
|
|
@ -70,18 +70,18 @@ void kMandatoryFieldGroup::add(TQWidget *widget)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
else if (widget->inherits(TQLINEEDIT_OBJECT_NAME_STRING))
|
|
|
|
else if (widget->inherits("TQLineEdit"))
|
|
|
|
connect((TQLineEdit*)widget->tqt_cast(TQLINEEDIT_OBJECT_NAME_STRING),
|
|
|
|
connect((TQLineEdit*)widget->tqt_cast("TQLineEdit"),
|
|
|
|
TQT_SIGNAL(textChanged(const TQString&)),
|
|
|
|
TQT_SIGNAL(textChanged(const TQString&)),
|
|
|
|
this, TQT_SLOT(changed()));
|
|
|
|
this, TQT_SLOT(changed()));
|
|
|
|
|
|
|
|
|
|
|
|
else if (widget->inherits(TQSPINBOX_OBJECT_NAME_STRING))
|
|
|
|
else if (widget->inherits("TQSpinBox"))
|
|
|
|
connect((TQSpinBox*)widget->tqt_cast(TQSPINBOX_OBJECT_NAME_STRING),
|
|
|
|
connect((TQSpinBox*)widget->tqt_cast("TQSpinBox"),
|
|
|
|
TQT_SIGNAL(valueChanged(const TQString&)),
|
|
|
|
TQT_SIGNAL(valueChanged(const TQString&)),
|
|
|
|
this, TQT_SLOT(changed()));
|
|
|
|
this, TQT_SLOT(changed()));
|
|
|
|
|
|
|
|
|
|
|
|
else if (widget->inherits(TQLISTBOX_OBJECT_NAME_STRING))
|
|
|
|
else if (widget->inherits("TQListBox"))
|
|
|
|
connect((TQListBox*)widget->tqt_cast(TQLISTBOX_OBJECT_NAME_STRING),
|
|
|
|
connect((TQListBox*)widget->tqt_cast("TQListBox"),
|
|
|
|
TQT_SIGNAL(selectionChanged()),
|
|
|
|
TQT_SIGNAL(selectionChanged()),
|
|
|
|
this, TQT_SLOT(changed()));
|
|
|
|
this, TQT_SLOT(changed()));
|
|
|
|
|
|
|
|
|
|
|
@ -125,29 +125,29 @@ void kMandatoryFieldGroup::changed(void)
|
|
|
|
if(!(widget->isEnabled())) {
|
|
|
|
if(!(widget->isEnabled())) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (widget->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) {
|
|
|
|
if (widget->inherits("TQCheckBox")) {
|
|
|
|
if (((TQCheckBox*)widget->tqt_cast(TQCHECKBOX_OBJECT_NAME_STRING))->state() == TQButton::NoChange) {
|
|
|
|
if (((TQCheckBox*)widget->tqt_cast("TQCheckBox"))->state() == TQButton::NoChange) {
|
|
|
|
enable = false;
|
|
|
|
enable = false;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (widget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)) {
|
|
|
|
if (widget->inherits("TQComboBox")) {
|
|
|
|
if (((TQComboBox*)widget->tqt_cast(TQCOMBOBOX_OBJECT_NAME_STRING))->currentText().isEmpty()) {
|
|
|
|
if (((TQComboBox*)widget->tqt_cast("TQComboBox"))->currentText().isEmpty()) {
|
|
|
|
enable = false;
|
|
|
|
enable = false;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (widget->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) {
|
|
|
|
if (widget->inherits("TQLineEdit")) {
|
|
|
|
if (((TQLineEdit*)widget->tqt_cast(TQLINEEDIT_OBJECT_NAME_STRING))->text().isEmpty()) {
|
|
|
|
if (((TQLineEdit*)widget->tqt_cast("TQLineEdit"))->text().isEmpty()) {
|
|
|
|
enable = false;
|
|
|
|
enable = false;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (widget->inherits(TQLISTBOX_OBJECT_NAME_STRING)) {
|
|
|
|
if (widget->inherits("TQListBox")) {
|
|
|
|
if (((TQListBox*)widget->tqt_cast(TQLISTBOX_OBJECT_NAME_STRING))->selectedItem() == 0) {
|
|
|
|
if (((TQListBox*)widget->tqt_cast("TQListBox"))->selectedItem() == 0) {
|
|
|
|
enable = false;
|
|
|
|
enable = false;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|