[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [artikulate] src: Setting audio output device is rare case.
From: Andreas Cord-Landwehr <cordlandwehr () kde ! org>
Date: 2013-05-25 11:52:24
Message-ID: 20130525115224.9B7C7A607F () git ! kde ! org
[Download RAW message or body]
Git commit 0367314f0859e5de7a8b2d66d84eff7e00e54455 by Andreas Cord-Landwehr.
Committed on 23/05/2013 at 23:08.
Pushed by cordlandwehr into branch 'master'.
Setting audio output device is rare case.
And hence it is enough if this can be done by system settings.
M +0 -3 src/artikulate.kcfg
M +0 -9 src/ui/sounddevicedialogpage.cpp
M +42 -59 src/ui/sounddevicedialogpage.ui
http://commits.kde.org/artikulate/0367314f0859e5de7a8b2d66d84eff7e00e54455
diff --git a/src/artikulate.kcfg b/src/artikulate.kcfg
index 66184cf..560a8fe 100644
--- a/src/artikulate.kcfg
+++ b/src/artikulate.kcfg
@@ -16,9 +16,6 @@
<entry name="AudioInputDevice" type="String">
<label>Name of audio input device</label>
</entry>
- <entry name="AudioOutputDevice" type="String">
- <label>Name of audio output device</label>
- </entry>
<entry name="AudioInputVolume" type="Int">
<label>Audio input volume</label>
<default>90</default>
diff --git a/src/ui/sounddevicedialogpage.cpp b/src/ui/sounddevicedialogpage.cpp
index b742950..6f8930b 100644
--- a/src/ui/sounddevicedialogpage.cpp
+++ b/src/ui/sounddevicedialogpage.cpp
@@ -47,13 +47,6 @@ SoundDeviceDialogPage::SoundDeviceDialogPage()
for (int i=0; i < m_audioInputs.length(); ++i) {
ui->kcfg_AudioInputDevice->insertItem(i, m_audioInputs.at(i), i);
}
-
- QAudioDeviceInfo info;
- QList<QAudioDeviceInfo> audioOutputs = info.availableDevices(QAudio::AudioOutput);
- for (int i=0; i < audioOutputs.length(); ++i) {
- ui->kcfg_AudioOutputDevice->insertItem(i, audioOutputs.at(i).deviceName(), i);
- m_audioOutputs.append(audioOutputs.at(i).deviceName());
- }
}
SoundDeviceDialogPage::~SoundDeviceDialogPage()
@@ -64,7 +57,6 @@ SoundDeviceDialogPage::~SoundDeviceDialogPage()
void SoundDeviceDialogPage::loadSettings()
{
// ui->kcfg_AudioInputDevice(Settings::audioInputDevice());
-// ui->kcfg_AudioOutputDevice(Settings::audioOutputDevice());
ui->kcfg_AudioInputVolume->setValue(Settings::audioInputVolume());
ui->kcfg_AudioOutputVolume->setValue(Settings::audioOutputVolume());
}
@@ -72,7 +64,6 @@ void SoundDeviceDialogPage::loadSettings()
void SoundDeviceDialogPage::saveSettings()
{
Settings::setAudioInputDevice(m_audioInputs.at(ui->kcfg_AudioInputDevice->currentIndex()));
- Settings::setAudioInputDevice(m_audioOutputs.at(ui->kcfg_AudioOutputDevice->currentIndex()));
Settings::setAudioInputVolume(ui->kcfg_AudioInputVolume->value());
Settings::setAudioOutputVolume(ui->kcfg_AudioOutputVolume->value());
Settings::self()->writeConfig();
diff --git a/src/ui/sounddevicedialogpage.ui b/src/ui/sounddevicedialogpage.ui
index 0e4d608..67db9ff 100644
--- a/src/ui/sounddevicedialogpage.ui
+++ b/src/ui/sounddevicedialogpage.ui
@@ -60,55 +60,6 @@
</layout>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QGroupBox" name="boxSpeakers">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Speakers</string>
- </property>
- <layout class="QFormLayout" name="formLayout_2">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::ExpandingFieldsGrow</enum>
- </property>
- <item row="1" column="0">
- <widget class="QLabel" name="labelOutputDevice">
- <property name="text">
- <string>Output Device</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="KComboBox" name="kcfg_AudioOutputDevice">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="labelOutputVolume">
- <property name="text">
- <string>Volume</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QSlider" name="kcfg_AudioOutputVolume">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
<item row="2" column="0">
<widget class="Line" name="line">
<property name="orientation">
@@ -118,6 +69,16 @@
</item>
<item row="4" column="0">
<layout class="QGridLayout" name="gridLayout">
+ <item row="1" column="3">
+ <widget class="QToolButton" name="buttonPlayRecordedTestSound">
+ <property name="toolTip">
+ <string>Play recorded test sound.</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
<item row="1" column="2">
<widget class="QToolButton" name="buttonRecordTestSound">
<property name="toolTip">
@@ -152,16 +113,6 @@
</property>
</widget>
</item>
- <item row="1" column="3">
- <widget class="QToolButton" name="buttonPlayRecordedTestSound">
- <property name="toolTip">
- <string>Play recorded test sound.</string>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
</layout>
</item>
<item row="3" column="0">
@@ -177,6 +128,38 @@
</property>
</widget>
</item>
+ <item row="1" column="0">
+ <widget class="QGroupBox" name="boxSpeakers">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Speakers</string>
+ </property>
+ <layout class="QFormLayout" name="formLayout_2">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::ExpandingFieldsGrow</enum>
+ </property>
+ <item row="1" column="0">
+ <widget class="QLabel" name="labelOutputVolume">
+ <property name="text">
+ <string>Volume</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QSlider" name="kcfg_AudioOutputVolume">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
</layout>
</widget>
<customwidgets>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic