summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp51
-rw-r--r--noncore/settings/sound/soundsettingsbase.ui566
2 files changed, 348 insertions, 269 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index 17dbdc0..c2bf405 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -27,2 +27,4 @@
#include <qlineedit.h>
+#include <qcombobox.h>
+
@@ -34,3 +36,3 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
volume->setValue(100-config.readNumEntry("Volume"));
- mic->setValue(100-config.readNumEntry("Mic"));
+ mic->setValue(100-config.readNumEntry("Mic"));
touchsound->setChecked(config.readBoolEntry("Touch"));
@@ -38,6 +40,13 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
- config.setGroup("Record");
- sampleRate->setText(config.readEntry("SampleRate", "11025"));
- stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0));
- sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0));
+ config.setGroup("Record");
+ int rate=config.readNumEntry("SampleRate", 11025);
+ if(rate == 11025)
+ sampleRate->setCurrentItem(0);
+ else if(rate == 22050)
+ sampleRate->setCurrentItem(1);
+ else if(rate==44100)
+ sampleRate->setCurrentItem(2);
+
+ stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0));
+ sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0));
@@ -46,3 +55,3 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) );
- connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) );
+ connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) );
}
@@ -54,8 +63,14 @@ void SoundSettings::reject()
setVolume(100-config.readNumEntry("Volume"));
- setMic(100-config.readNumEntry("Mic"));
+ setMic(100-config.readNumEntry("Mic"));
- config.setGroup("Record");
- sampleRate->setText(config.readEntry("SampleRate", "11025"));
- stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0));
- sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0));
+ config.setGroup("Record");
+ int rate=config.readNumEntry("SampleRate", 11025);
+ if(rate == 11025)
+ sampleRate->setCurrentItem(0);
+ else if(rate == 22050)
+ sampleRate->setCurrentItem(1);
+ else if(rate==44100)
+ sampleRate->setCurrentItem(2);
+ stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0));
+ sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0));
@@ -74,9 +89,9 @@ void SoundSettings::accept()
setVolume(volume->value());
- setMic(mic->value());
+ setMic(mic->value());
- config.setGroup("Record");
- config.writeEntry("SampleRate",sampleRate->text());
- config.writeEntry("Stereo",stereoCheckBox->isChecked());
- config.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
-
+ config.setGroup("Record");
+ config.writeEntry("SampleRate",sampleRate->currentText());
+ config.writeEntry("Stereo",stereoCheckBox->isChecked());
+ config.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
+
QDialog::accept();
@@ -90,3 +105,3 @@ void SoundSettings::setVolume(int v)
#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
- QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
+ QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
#endif
diff --git a/noncore/settings/sound/soundsettingsbase.ui b/noncore/settings/sound/soundsettingsbase.ui
index f47f77e..0351fd8 100644
--- a/noncore/settings/sound/soundsettingsbase.ui
+++ b/noncore/settings/sound/soundsettingsbase.ui
@@ -13,4 +13,4 @@
<y>0</y>
- <width>372</width>
- <height>441</height>
+ <width>286</width>
+ <height>338</height>
</rect>
@@ -36,3 +36,3 @@
</property>
- <widget row="0" column="0" >
+ <widget row="0" column="1" >
<class>QLayoutWidget</class>
@@ -40,5 +40,5 @@
<name>name</name>
- <cstring>Layout30</cstring>
+ <cstring>Layout9</cstring>
</property>
- <hbox>
+ <vbox>
<property stdset="1">
@@ -55,3 +55,3 @@
<name>name</name>
- <cstring>Layout24</cstring>
+ <cstring>Layout8</cstring>
</property>
@@ -67,2 +67,98 @@
<widget>
+ <class>QGroupBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Vmemo</string>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="0" column="0" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout15</cstring>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>sampleRateLabel</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Sample Rate</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>11025</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>22050</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>44100</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>sampleRate</cstring>
+ </property>
+ </widget>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>stereoCheckBox</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Stereo</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>sixteenBitCheckBox</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>16 bit</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget>
<class>QCheckBox</class>
@@ -74,3 +170,3 @@
<name>text</name>
- <string>Screen sound</string>
+ <string>Screen sounds</string>
</property>
@@ -85,5 +181,64 @@
<name>text</name>
- <string>Keyboard sound</string>
+ <string>Keyboard sounds</string>
</property>
</widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer10</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Vertical</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget row="0" column="0" >
+ <class>QGroupBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>GroupBox3</cstring>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Levels</string>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout10</cstring>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
<widget>
@@ -92,3 +247,3 @@
<name>name</name>
- <cstring>Layout11</cstring>
+ <cstring>Layout16</cstring>
</property>
@@ -106,3 +261,3 @@
<name>name</name>
- <cstring>Spacer3_2_2</cstring>
+ <cstring>Spacer37</cstring>
</property>
@@ -153,3 +308,3 @@
<name>name</name>
- <cstring>Spacer3_2</cstring>
+ <cstring>Spacer7</cstring>
</property>
@@ -177,3 +332,3 @@
<name>name</name>
- <cstring>Layout11</cstring>
+ <cstring>Layout13</cstring>
</property>
@@ -189,55 +344,11 @@
<widget>
- <class>QLayoutWidget</class>
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout7</cstring>
+ <cstring>volLabel</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Output</string>
</property>
- <vbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>volLabel</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Volume</string>
- </property>
- </widget>
- <widget>
- <class>QSlider</class>
- <property stdset="1">
- <name>name</name>
- <cstring>volume</cstring>
- </property>
- <property stdset="1">
- <name>maxValue</name>
- <number>100</number>
- </property>
- <property stdset="1">
- <name>value</name>
- <number>50</number>
- </property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Vertical</enum>
- </property>
- <property stdset="1">
- <name>tickmarks</name>
- <enum>Right</enum>
- </property>
- <property stdset="1">
- <name>tickInterval</name>
- <number>5</number>
- </property>
- </widget>
- </vbox>
</widget>
@@ -246,3 +357,3 @@
<name>name</name>
- <cstring>Spacer5_2</cstring>
+ <cstring>Spacer20</cstring>
</property>
@@ -250,3 +361,3 @@
<name>orientation</name>
- <enum>Vertical</enum>
+ <enum>Horizontal</enum>
</property>
@@ -265,56 +376,33 @@
<widget>
- <class>QLayoutWidget</class>
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout8</cstring>
+ <cstring>micLabel</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Mic</string>
</property>
- <vbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>micLabel</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Microphone</string>
- </property>
- </widget>
- <widget>
- <class>QSlider</class>
- <property stdset="1">
- <name>name</name>
- <cstring>mic</cstring>
- </property>
- <property stdset="1">
- <name>maxValue</name>
- <number>100</number>
- </property>
- <property stdset="1">
- <name>value</name>
- <number>50</number>
- </property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Vertical</enum>
- </property>
- <property stdset="1">
- <name>tickmarks</name>
- <enum>Right</enum>
- </property>
- <property stdset="1">
- <name>tickInterval</name>
- <number>5</number>
- </property>
- </widget>
- </vbox>
</widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer17</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
</hbox>
@@ -336,2 +424,29 @@
</property>
+ <widget>
+ <class>QSlider</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>volume</cstring>
+ </property>
+ <property stdset="1">
+ <name>maxValue</name>
+ <number>100</number>
+ </property>
+ <property stdset="1">
+ <name>value</name>
+ <number>50</number>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Vertical</enum>
+ </property>
+ <property stdset="1">
+ <name>tickmarks</name>
+ <enum>Right</enum>
+ </property>
+ <property stdset="1">
+ <name>tickInterval</name>
+ <number>5</number>
+ </property>
+ </widget>
<spacer>
@@ -339,3 +454,3 @@
<name>name</name>
- <cstring>Spacer3_2_3</cstring>
+ <cstring>Spacer19</cstring>
</property>
@@ -358,25 +473,26 @@
<widget>
- <class>QLabel</class>
+ <class>QSlider</class>
<property stdset="1">
<name>name</name>
- <cstring>PixmapLabel2_2</cstring>
+ <cstring>mic</cstring>
</property>
<property stdset="1">
- <name>pixmap</name>
- <pixmap>image1</pixmap>
+ <name>maxValue</name>
+ <number>100</number>
</property>
<property stdset="1">
- <name>scaledContents</name>
- <bool>false</bool>
+ <name>value</name>
+ <number>50</number>
</property>
- </widget>
- <widget>
- <class>QLabel</class>
<property stdset="1">
- <name>name</name>
- <cstring>TextLabel2_2</cstring>
+ <name>orientation</name>
+ <enum>Vertical</enum>
</property>
<property stdset="1">
- <name>text</name>
- <string>Silent</string>
+ <name>tickmarks</name>
+ <enum>Right</enum>
+ </property>
+ <property stdset="1">
+ <name>tickInterval</name>
+ <number>5</number>
</property>
@@ -386,3 +502,3 @@
<name>name</name>
- <cstring>Spacer2_2</cstring>
+ <cstring>Spacer18</cstring>
</property>
@@ -406,33 +522,12 @@
</widget>
- </vbox>
- </widget>
- <widget>
- <class>QLayoutWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Layout29</cstring>
- </property>
- <vbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
<widget>
- <class>QGroupBox</class>
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>GroupBox1</cstring>
- </property>
- <property stdset="1">
- <name>title</name>
- <string>Record Defaults</string>
+ <cstring>Layout17</cstring>
</property>
- <grid>
+ <hbox>
<property stdset="1">
<name>margin</name>
- <number>11</number>
+ <number>0</number>
</property>
@@ -442,106 +537,75 @@
</property>
- <widget row="0" column="0" >
- <class>QLayoutWidget</class>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer38</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget>
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout28</cstring>
+ <cstring>PixmapLabel2_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>pixmap</name>
+ <pixmap>image1</pixmap>
+ </property>
+ <property stdset="1">
+ <name>scaledContents</name>
+ <bool>false</bool>
</property>
- <vbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>sampleRateLabel</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Rate (5k-44k)</string>
- </property>
- </widget>
- <widget>
- <class>QLineEdit</class>
- <property stdset="1">
- <name>name</name>
- <cstring>sampleRate</cstring>
- </property>
- </widget>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>stereoCheckBox</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Stereo</string>
- </property>
- </widget>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>sixteenBitCheckBox</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>16 bit</string>
- </property>
- </widget>
- </vbox>
</widget>
- </grid>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Silent</string>
+ </property>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer8</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
</widget>
- <spacer>
- <property>
- <name>name</name>
- <cstring>Spacer9</cstring>
- </property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Vertical</enum>
- </property>
- <property stdset="1">
- <name>sizeType</name>
- <enum>Expanding</enum>
- </property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
</vbox>
</widget>
- <spacer>
- <property>
- <name>name</name>
- <cstring>Spacer10</cstring>
- </property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Horizontal</enum>
- </property>
- <property stdset="1">
- <name>sizeType</name>
- <enum>Expanding</enum>
- </property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </hbox>
+ </vbox>
</widget>