|
|
|
@ -42,6 +42,11 @@ AdvancedForm::AdvancedForm() :
@@ -42,6 +42,11 @@ AdvancedForm::AdvancedForm() :
|
|
|
|
|
connect(bodyUI->cbMakeToxPortable, &QCheckBox::stateChanged, this, &AdvancedForm::onMakeToxPortableUpdated); |
|
|
|
|
connect(bodyUI->syncTypeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onDbSyncTypeUpdated())); |
|
|
|
|
connect(bodyUI->resetButton, SIGNAL(clicked()), this, SLOT(resetToDefault())); |
|
|
|
|
|
|
|
|
|
foreach(QComboBox *cb, findChildren<QComboBox*>() ) { |
|
|
|
|
cb->installEventFilter(this); |
|
|
|
|
cb->setFocusPolicy(Qt::StrongFocus); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
AdvancedForm::~AdvancedForm() |
|
|
|
@ -67,3 +72,14 @@ void AdvancedForm::resetToDefault()
@@ -67,3 +72,14 @@ void AdvancedForm::resetToDefault()
|
|
|
|
|
bodyUI->syncTypeComboBox->setCurrentIndex(index); |
|
|
|
|
onDbSyncTypeUpdated(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool AdvancedForm::eventFilter(QObject *o, QEvent *e) |
|
|
|
|
{ |
|
|
|
|
if ((e->type() == QEvent::Wheel) && |
|
|
|
|
(qobject_cast<QComboBox*>(o) || qobject_cast<QAbstractSpinBox*>(o) )) |
|
|
|
|
{ |
|
|
|
|
e->ignore(); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
return QWidget::eventFilter(o, e); |
|
|
|
|
} |
|
|
|
|