Commit 035f929e authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk

advancedsipsettingwidget: prevent mouse wheel event for qspinbox

Change-Id: I61a80d612c908e1af4d009b1a3c8077cc274bbf2
parent fd15867a
......@@ -140,6 +140,16 @@ AdvancedSIPSettingsWidget::AdvancedSIPSettingsWidget(QWidget* parent)
// voicemail
connect(ui->lineEditVoiceMailDialCode, &QLineEdit::editingFinished, this,
&AdvancedSIPSettingsWidget::lineEditVoiceMailDialCodeEditFinished);
// prevent wheel event for spinbox
ui->negotiationTimeoutSpinBox->installEventFilter(this);
ui->registrationExpireTimeoutSpinBox->installEventFilter(this);
ui->networkInterfaceSpinBox->installEventFilter(this);
ui->customPortSIPSpinBox->installEventFilter(this);
ui->audioRTPMinPortSpinBox->installEventFilter(this);
ui->audioRTPMaxPortSpinBox->installEventFilter(this);
ui->videoRTPMinPortSpinBox->installEventFilter(this);
ui->videoRTPMaxPortSpinBox->installEventFilter(this);
}
AdvancedSIPSettingsWidget::~AdvancedSIPSettingsWidget()
......@@ -691,3 +701,12 @@ AdvancedSIPSettingsWidget::lineEditVoiceMailDialCodeEditFinished()
confProps.mailbox = ui->lineEditVoiceMailDialCode->text().toStdString();
LRCInstance::accountModel().setAccountConfig(LRCInstance::getCurrAccId(), confProps);
}
bool
AdvancedSIPSettingsWidget::eventFilter(QObject * object, QEvent * event)
{
if (event->type() == QEvent::Wheel) {
return true;
}
return false;
}
......@@ -43,6 +43,9 @@ public:
const QString& fileTypeFilter,
QPushButton* button);
protected:
bool eventFilter(QObject *object, QEvent *event);
private:
Ui::AdvancedSIPSettingsWidget* ui;
......
......@@ -937,6 +937,9 @@
<pointsize>10</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum">
<number>3000</number>
</property>
......@@ -1408,6 +1411,9 @@
<pointsize>10</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum">
<number>65536</number>
</property>
......@@ -1426,6 +1432,9 @@
<pointsize>10</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum">
<number>3000</number>
</property>
......@@ -1594,6 +1603,9 @@
<pointsize>10</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum">
<number>65535</number>
</property>
......@@ -2199,6 +2211,9 @@
<pointsize>10</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum">
<number>65535</number>
</property>
......@@ -2223,6 +2238,9 @@
<pointsize>10</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum">
<number>65535</number>
</property>
......@@ -2241,6 +2259,9 @@
<pointsize>10</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum">
<number>65535</number>
</property>
......@@ -2309,6 +2330,9 @@
<pointsize>10</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum">
<number>65535</number>
</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment