mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Completely remove filteraudio checkbox from the ui
This commit is contained in:
parent
e5cc004edf
commit
685d91f0a3
|
@ -1239,7 +1239,8 @@ void Settings::setOutVolume(int volume)
|
|||
bool Settings::getFilterAudio() const
|
||||
{
|
||||
QMutexLocker locker{&bigLock};
|
||||
return filterAudio;
|
||||
// temporary disable filteraudio, as it doesn't work as expected
|
||||
return false;
|
||||
}
|
||||
|
||||
void Settings::setFilterAudio(bool newValue)
|
||||
|
|
|
@ -47,20 +47,12 @@ AVForm::AVForm() :
|
|||
bodyUI->btnPlayTestSound->setToolTip(
|
||||
tr("Play a test sound while changing the output volume."));
|
||||
|
||||
#ifdef QTOX_FILTER_AUDIO
|
||||
bodyUI->filterAudio->setChecked(Settings::getInstance().getFilterAudio());
|
||||
#else
|
||||
bodyUI->filterAudio->setDisabled(true);
|
||||
#endif
|
||||
|
||||
auto qcbxIndexChangedStr = (void(QComboBox::*)(const QString&)) &QComboBox::currentIndexChanged;
|
||||
auto qcbxIndexChangedInt = (void(QComboBox::*)(int)) &QComboBox::currentIndexChanged;
|
||||
connect(bodyUI->inDevCombobox, qcbxIndexChangedStr, this, &AVForm::onInDevChanged);
|
||||
connect(bodyUI->outDevCombobox, qcbxIndexChangedStr, this, &AVForm::onOutDevChanged);
|
||||
connect(bodyUI->videoDevCombobox, qcbxIndexChangedInt, this, &AVForm::onVideoDevChanged);
|
||||
connect(bodyUI->videoModescomboBox, qcbxIndexChangedInt, this, &AVForm::onVideoModesIndexChanged);
|
||||
|
||||
connect(bodyUI->filterAudio, &QCheckBox::toggled, this, &AVForm::onFilterAudioToggled);
|
||||
connect(bodyUI->rescanButton, &QPushButton::clicked, this, [=]()
|
||||
{
|
||||
getAudioInDevices();
|
||||
|
@ -87,11 +79,6 @@ AVForm::AVForm() :
|
|||
cb->setFocusPolicy(Qt::StrongFocus);
|
||||
}
|
||||
|
||||
for (QCheckBox *cb : findChildren<QCheckBox*>()) // this one is to allow scrolling on checkboxes
|
||||
{
|
||||
cb->installEventFilter(this);
|
||||
}
|
||||
|
||||
Translator::registerHandler(std::bind(&AVForm::retranslateUi, this), this);
|
||||
}
|
||||
|
||||
|
@ -415,7 +402,7 @@ void AVForm::killVideoSurface()
|
|||
bool AVForm::eventFilter(QObject *o, QEvent *e)
|
||||
{
|
||||
if ((e->type() == QEvent::Wheel) &&
|
||||
(qobject_cast<QComboBox*>(o) || qobject_cast<QAbstractSpinBox*>(o) || qobject_cast<QCheckBox*>(o) || qobject_cast<QSlider*>(o)))
|
||||
(qobject_cast<QComboBox*>(o) || qobject_cast<QAbstractSpinBox*>(o) || qobject_cast<QSlider*>(o)))
|
||||
{
|
||||
e->ignore();
|
||||
return true;
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>830</width>
|
||||
<height>495</height>
|
||||
<width>824</width>
|
||||
<height>489</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
|
@ -41,27 +41,13 @@
|
|||
<string>Audio Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="outDevLabel">
|
||||
<property name="text">
|
||||
<string>Playback device</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="outDevCombobox"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="playbackLabel">
|
||||
<property name="text">
|
||||
<string>Volume</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSlider" name="playbackSlider">
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QSlider" name="microphoneSlider">
|
||||
<property name="toolTip">
|
||||
<string>Use slider to set volume of your speakers.</string>
|
||||
<string>Use slider to set volume of your microphone.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
|
@ -71,6 +57,23 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="microphoneLabel">
|
||||
<property name="text">
|
||||
<string>Gain</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="inDevCombobox"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="outDevLabel">
|
||||
<property name="text">
|
||||
<string>Playback device</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QToolButton" name="btnPlayTestSound">
|
||||
<property name="text">
|
||||
|
@ -85,27 +88,10 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="inDevLabel">
|
||||
<property name="text">
|
||||
<string>Capture device</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="inDevCombobox"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="microphoneLabel">
|
||||
<property name="text">
|
||||
<string>Gain</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QSlider" name="microphoneSlider">
|
||||
<item row="1" column="1">
|
||||
<widget class="QSlider" name="playbackSlider">
|
||||
<property name="toolTip">
|
||||
<string>Use slider to set volume of your microphone.</string>
|
||||
<string>Use slider to set volume of your speakers.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
|
@ -115,13 +101,17 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="filterAudio">
|
||||
<property name="toolTip">
|
||||
<string>Filter sound from your microphone, so that people hearing you would get better sound.</string>
|
||||
</property>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="inDevLabel">
|
||||
<property name="text">
|
||||
<string>Filter audio</string>
|
||||
<string>Capture device</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="playbackLabel">
|
||||
<property name="text">
|
||||
<string>Volume</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in New Issue
Block a user