summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-03-17 13:08:37 (UTC)
committer llornkcor <llornkcor>2002-03-17 13:08:37 (UTC)
commit2f18edca6cc3539298deccee89e6f4dd7a2570a2 (patch) (side-by-side diff)
tree58eefa2b254a4c30a266681bd077e0e8029384e3
parent578725ca25862c0b06b1991a7bc8ffc2ad8ae13e (diff)
downloadopie-2f18edca6cc3539298deccee89e6f4dd7a2570a2.zip
opie-2f18edca6cc3539298deccee89e6f4dd7a2570a2.tar.gz
opie-2f18edca6cc3539298deccee89e6f4dd7a2570a2.tar.bz2
changed line edit to combo, and changed labels and layout
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp21
-rw-r--r--noncore/settings/sound/soundsettingsbase.ui416
2 files changed, 258 insertions, 179 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
@@ -24,8 +24,10 @@
#include <qapplication.h>
#include <qslider.h>
#include <qcheckbox.h>
#include <qlineedit.h>
+#include <qcombobox.h>
+
SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
: SoundSettingsBase( parent, name, TRUE, fl )
{
@@ -36,9 +38,16 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
touchsound->setChecked(config.readBoolEntry("Touch"));
keysound->setChecked(config.readBoolEntry("Key"));
config.setGroup("Record");
- sampleRate->setText(config.readEntry("SampleRate", "11025"));
+ 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));
connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int)));
@@ -54,9 +63,15 @@ void SoundSettings::reject()
setVolume(100-config.readNumEntry("Volume"));
setMic(100-config.readNumEntry("Mic"));
config.setGroup("Record");
- sampleRate->setText(config.readEntry("SampleRate", "11025"));
+ 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));
QDialog::reject();
@@ -74,9 +89,9 @@ void SoundSettings::accept()
setVolume(volume->value());
setMic(mic->value());
config.setGroup("Record");
- config.writeEntry("SampleRate",sampleRate->text());
+ config.writeEntry("SampleRate",sampleRate->currentText());
config.writeEntry("Stereo",stereoCheckBox->isChecked());
config.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
QDialog::accept();
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
@@ -10,10 +10,10 @@
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>372</width>
- <height>441</height>
+ <width>286</width>
+ <height>338</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
@@ -33,15 +33,15 @@
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
- <widget row="0" column="0" >
+ <widget row="0" column="1" >
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout30</cstring>
+ <cstring>Layout9</cstring>
</property>
- <hbox>
+ <vbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
@@ -52,9 +52,9 @@
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout24</cstring>
+ <cstring>Layout8</cstring>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
@@ -64,16 +64,112 @@
<name>spacing</name>
<number>6</number>
</property>
<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>
<property stdset="1">
<name>name</name>
<cstring>touchsound</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Screen sound</string>
+ <string>Screen sounds</string>
</property>
</widget>
<widget>
<class>QCheckBox</class>
@@ -82,16 +178,75 @@
<cstring>keysound</cstring>
</property>
<property stdset="1">
<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>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout11</cstring>
+ <cstring>Layout16</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
@@ -103,9 +258,9 @@
</property>
<spacer>
<property>
<name>name</name>
- <cstring>Spacer3_2_2</cstring>
+ <cstring>Spacer37</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
@@ -150,9 +305,9 @@
</widget>
<spacer>
<property>
<name>name</name>
- <cstring>Spacer3_2</cstring>
+ <cstring>Spacer7</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
@@ -174,9 +329,9 @@
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout11</cstring>
+ <cstring>Layout13</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
@@ -186,70 +341,58 @@
<name>spacing</name>
<number>6</number>
</property>
<widget>
- <class>QLayoutWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Layout7</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>volLabel</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Volume</string>
+ <string>Output</string>
</property>
</widget>
- <widget>
- <class>QSlider</class>
- <property stdset="1">
+ <spacer>
+ <property>
<name>name</name>
- <cstring>volume</cstring>
+ <cstring>Spacer20</cstring>
</property>
<property stdset="1">
- <name>maxValue</name>
- <number>100</number>
+ <name>orientation</name>
+ <enum>Horizontal</enum>
</property>
<property stdset="1">
- <name>value</name>
- <number>50</number>
+ <name>sizeType</name>
+ <enum>Expanding</enum>
</property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Vertical</enum>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
</property>
+ </spacer>
+ <widget>
+ <class>QLabel</class>
<property stdset="1">
- <name>tickmarks</name>
- <enum>Right</enum>
+ <name>name</name>
+ <cstring>micLabel</cstring>
</property>
<property stdset="1">
- <name>tickInterval</name>
- <number>5</number>
+ <name>text</name>
+ <string>Mic</string>
</property>
</widget>
- </vbox>
- </widget>
<spacer>
<property>
<name>name</name>
- <cstring>Spacer5_2</cstring>
+ <cstring>Spacer17</cstring>
</property>
<property stdset="1">
<name>orientation</name>
- <enum>Vertical</enum>
+ <enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
@@ -261,15 +404,17 @@
<height>20</height>
</size>
</property>
</spacer>
+ </hbox>
+ </widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout8</cstring>
+ <cstring>Layout12</cstring>
</property>
- <vbox>
+ <hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
@@ -277,23 +422,12 @@
<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>
+ <cstring>volume</cstring>
</property>
<property stdset="1">
<name>maxValue</name>
<number>100</number>
@@ -314,31 +448,12 @@
<name>tickInterval</name>
<number>5</number>
</property>
</widget>
- </vbox>
- </widget>
- </hbox>
- </widget>
- <widget>
- <class>QLayoutWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Layout12</cstring>
- </property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
<spacer>
<property>
<name>name</name>
- <cstring>Spacer3_2_3</cstring>
+ <cstring>Spacer19</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
@@ -355,37 +470,38 @@
</size>
</property>
</spacer>
<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>
</widget>
<spacer>
<property>
<name>name</name>
- <cstring>Spacer2_2</cstring>
+ <cstring>Spacer18</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
@@ -403,130 +519,74 @@
</property>
</spacer>
</hbox>
</widget>
- </vbox>
- </widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout29</cstring>
+ <cstring>Layout17</cstring>
</property>
- <vbox>
+ <hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
- <widget>
- <class>QGroupBox</class>
- <property stdset="1">
+ <spacer>
+ <property>
<name>name</name>
- <cstring>GroupBox1</cstring>
+ <cstring>Spacer38</cstring>
</property>
<property stdset="1">
- <name>title</name>
- <string>Record Defaults</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>Layout28</cstring>
+ <name>orientation</name>
+ <enum>Horizontal</enum>
</property>
- <vbox>
<property stdset="1">
- <name>margin</name>
- <number>0</number>
+ <name>sizeType</name>
+ <enum>Expanding</enum>
</property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
+ <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>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>
+ <cstring>PixmapLabel2_2</cstring>
</property>
- </widget>
- <widget>
- <class>QCheckBox</class>
<property stdset="1">
- <name>name</name>
- <cstring>stereoCheckBox</cstring>
+ <name>pixmap</name>
+ <pixmap>image1</pixmap>
</property>
<property stdset="1">
- <name>text</name>
- <string>Stereo</string>
+ <name>scaledContents</name>
+ <bool>false</bool>
</property>
</widget>
<widget>
- <class>QCheckBox</class>
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>sixteenBitCheckBox</cstring>
+ <cstring>TextLabel2_2</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>16 bit</string>
- </property>
- </widget>
- </vbox>
- </widget>
- </grid>
- </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>
+ <string>Silent</string>
</property>
- </spacer>
- </vbox>
</widget>
<spacer>
<property>
<name>name</name>
- <cstring>Spacer10</cstring>
+ <cstring>Spacer8</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
@@ -544,8 +604,12 @@
</property>
</spacer>
</hbox>
</widget>
+ </vbox>
+ </widget>
+ </vbox>
+ </widget>
</grid>
</widget>
<images>
<image>