Skip to content
Snippets Groups Projects
Commit 035f929e authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk
Browse files

advancedsipsettingwidget: prevent mouse wheel event for qspinbox

Change-Id: I61a80d612c908e1af4d009b1a3c8077cc274bbf2
parent fd15867a
Branches
Tags
No related merge requests found
...@@ -140,6 +140,16 @@ AdvancedSIPSettingsWidget::AdvancedSIPSettingsWidget(QWidget* parent) ...@@ -140,6 +140,16 @@ AdvancedSIPSettingsWidget::AdvancedSIPSettingsWidget(QWidget* parent)
// voicemail // voicemail
connect(ui->lineEditVoiceMailDialCode, &QLineEdit::editingFinished, this, connect(ui->lineEditVoiceMailDialCode, &QLineEdit::editingFinished, this,
&AdvancedSIPSettingsWidget::lineEditVoiceMailDialCodeEditFinished); &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() AdvancedSIPSettingsWidget::~AdvancedSIPSettingsWidget()
...@@ -691,3 +701,12 @@ AdvancedSIPSettingsWidget::lineEditVoiceMailDialCodeEditFinished() ...@@ -691,3 +701,12 @@ AdvancedSIPSettingsWidget::lineEditVoiceMailDialCodeEditFinished()
confProps.mailbox = ui->lineEditVoiceMailDialCode->text().toStdString(); confProps.mailbox = ui->lineEditVoiceMailDialCode->text().toStdString();
LRCInstance::accountModel().setAccountConfig(LRCInstance::getCurrAccId(), confProps); 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: ...@@ -43,6 +43,9 @@ public:
const QString& fileTypeFilter, const QString& fileTypeFilter,
QPushButton* button); QPushButton* button);
protected:
bool eventFilter(QObject *object, QEvent *event);
private: private:
Ui::AdvancedSIPSettingsWidget* ui; Ui::AdvancedSIPSettingsWidget* ui;
......
...@@ -937,6 +937,9 @@ ...@@ -937,6 +937,9 @@
<pointsize>10</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum"> <property name="maximum">
<number>3000</number> <number>3000</number>
</property> </property>
...@@ -1408,6 +1411,9 @@ ...@@ -1408,6 +1411,9 @@
<pointsize>10</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum"> <property name="maximum">
<number>65536</number> <number>65536</number>
</property> </property>
...@@ -1426,6 +1432,9 @@ ...@@ -1426,6 +1432,9 @@
<pointsize>10</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum"> <property name="maximum">
<number>3000</number> <number>3000</number>
</property> </property>
...@@ -1594,6 +1603,9 @@ ...@@ -1594,6 +1603,9 @@
<pointsize>10</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum"> <property name="maximum">
<number>65535</number> <number>65535</number>
</property> </property>
...@@ -2199,6 +2211,9 @@ ...@@ -2199,6 +2211,9 @@
<pointsize>10</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum"> <property name="maximum">
<number>65535</number> <number>65535</number>
</property> </property>
...@@ -2223,6 +2238,9 @@ ...@@ -2223,6 +2238,9 @@
<pointsize>10</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum"> <property name="maximum">
<number>65535</number> <number>65535</number>
</property> </property>
...@@ -2241,6 +2259,9 @@ ...@@ -2241,6 +2259,9 @@
<pointsize>10</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum"> <property name="maximum">
<number>65535</number> <number>65535</number>
</property> </property>
...@@ -2309,6 +2330,9 @@ ...@@ -2309,6 +2330,9 @@
<pointsize>10</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="maximum"> <property name="maximum">
<number>65535</number> <number>65535</number>
</property> </property>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment