mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge branch 'pr2532'
This commit is contained in:
commit
f9c324c0f2
@ -69,6 +69,9 @@ AVForm::AVForm() :
|
|||||||
bodyUI->playbackSlider->setValue(Settings::getInstance().getOutVolume());
|
bodyUI->playbackSlider->setValue(Settings::getInstance().getOutVolume());
|
||||||
bodyUI->microphoneSlider->setValue(Settings::getInstance().getInVolume());
|
bodyUI->microphoneSlider->setValue(Settings::getInstance().getInVolume());
|
||||||
|
|
||||||
|
bodyUI->playbackSlider->installEventFilter(this);
|
||||||
|
bodyUI->microphoneSlider->installEventFilter(this);
|
||||||
|
|
||||||
for (QComboBox* cb : findChildren<QComboBox*>())
|
for (QComboBox* cb : findChildren<QComboBox*>())
|
||||||
{
|
{
|
||||||
cb->installEventFilter(this);
|
cb->installEventFilter(this);
|
||||||
@ -265,9 +268,9 @@ void AVForm::getAudioInDevices()
|
|||||||
{
|
{
|
||||||
int len = strlen(pDeviceList);
|
int len = strlen(pDeviceList);
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QString inDev = QString::fromUtf8(pDeviceList,len);
|
QString inDev = QString::fromUtf8(pDeviceList, len);
|
||||||
#else
|
#else
|
||||||
QString inDev = QString::fromLocal8Bit(pDeviceList,len);
|
QString inDev = QString::fromLocal8Bit(pDeviceList, len);
|
||||||
#endif
|
#endif
|
||||||
bodyUI->inDevCombobox->addItem(inDev);
|
bodyUI->inDevCombobox->addItem(inDev);
|
||||||
if (settingsInDev == inDev)
|
if (settingsInDev == inDev)
|
||||||
@ -300,9 +303,9 @@ void AVForm::getAudioOutDevices()
|
|||||||
{
|
{
|
||||||
int len = strlen(pDeviceList);
|
int len = strlen(pDeviceList);
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QString outDev = QString::fromUtf8(pDeviceList,len);
|
QString outDev = QString::fromUtf8(pDeviceList, len);
|
||||||
#else
|
#else
|
||||||
QString outDev = QString::fromLocal8Bit(pDeviceList,len);
|
QString outDev = QString::fromLocal8Bit(pDeviceList, len);
|
||||||
#endif
|
#endif
|
||||||
bodyUI->outDevCombobox->addItem(outDev);
|
bodyUI->outDevCombobox->addItem(outDev);
|
||||||
if (settingsOutDev == outDev)
|
if (settingsOutDev == outDev)
|
||||||
@ -361,7 +364,7 @@ void AVForm::onMicrophoneValueChanged(int value)
|
|||||||
bool AVForm::eventFilter(QObject *o, QEvent *e)
|
bool AVForm::eventFilter(QObject *o, QEvent *e)
|
||||||
{
|
{
|
||||||
if ((e->type() == QEvent::Wheel) &&
|
if ((e->type() == QEvent::Wheel) &&
|
||||||
(qobject_cast<QComboBox*>(o) || qobject_cast<QAbstractSpinBox*>(o) ))
|
(qobject_cast<QComboBox*>(o) || qobject_cast<QAbstractSpinBox*>(o) || qobject_cast<QSlider*>(o)))
|
||||||
{
|
{
|
||||||
e->ignore();
|
e->ignore();
|
||||||
return true;
|
return true;
|
||||||
|
@ -73,8 +73,8 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::AVSettings *bodyUI;
|
Ui::AVSettings *bodyUI;
|
||||||
VideoSurface* camVideoSurface;
|
VideoSurface *camVideoSurface;
|
||||||
CameraSource& camera;
|
CameraSource &camera;
|
||||||
QVector<QPair<QString, QString>> videoDeviceList;
|
QVector<QPair<QString, QString>> videoDeviceList;
|
||||||
QVector<VideoMode> videoModes;
|
QVector<VideoMode> videoModes;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user