author | jeremy <jeremy> | 2002-02-11 04:36:18 (UTC) |
---|---|---|
committer | jeremy <jeremy> | 2002-02-11 04:36:18 (UTC) |
commit | 68d08b102aef5f73f2f1b3c5d693c26647f48c33 (patch) (side-by-side diff) | |
tree | f89dac5a0344f2b38f0ea68cae98f58e7bb1816d | |
parent | 738f33e4dddf1ce71580bd3651a8457867625501 (diff) | |
download | opie-68d08b102aef5f73f2f1b3c5d693c26647f48c33.zip opie-68d08b102aef5f73f2f1b3c5d693c26647f48c33.tar.gz opie-68d08b102aef5f73f2f1b3c5d693c26647f48c33.tar.bz2 |
Added Record Prefs (Sample Rate, Stereo, and Sixteen or Eight Bit
settings. It writes this information to the standad Sound.conf, however
under the Record group not System group.
-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 21 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.ui | 319 |
2 files changed, 235 insertions, 105 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index 1143e82..17dbdc0 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp @@ -36,6 +36,9 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl ) touchsound->setChecked(config.readBoolEntry("Touch")); keysound->setChecked(config.readBoolEntry("Key")); - dblClickRuns->setText(config.readEntry("DblClickVolumeRuns", - "/opt/QtPalmtop/bin/vmemomanager")); + + config.setGroup("Record"); + sampleRate->setText(config.readEntry("SampleRate", "11025")); + stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0)); + sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0)); connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); @@ -52,4 +55,9 @@ void SoundSettings::reject() 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)); + QDialog::reject(); } @@ -63,6 +71,13 @@ void SoundSettings::accept() config.writeEntry("Touch",touchsound->isChecked()); config.writeEntry("Key",keysound->isChecked()); - config.writeEntry("DblClickVolumeRuns", dblClickRuns->text()); + setVolume(volume->value()); + setMic(mic->value()); + + config.setGroup("Record"); + config.writeEntry("SampleRate",sampleRate->text()); + 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 0b2b2be..f47f77e 100644 --- a/noncore/settings/sound/soundsettingsbase.ui +++ b/noncore/settings/sound/soundsettingsbase.ui @@ -12,5 +12,5 @@ <x>0</x> <y>0</y> - <width>376</width> + <width>372</width> <height>441</height> </rect> @@ -39,5 +39,20 @@ <property stdset="1"> <name>name</name> - <cstring>Layout8</cstring> + <cstring>Layout30</cstring> + </property> + <hbox> + <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>Layout24</cstring> </property> <vbox> @@ -54,9 +69,9 @@ <property stdset="1"> <name>name</name> - <cstring>keysound</cstring> + <cstring>touchsound</cstring> </property> <property stdset="1"> <name>text</name> - <string>Keyboard sound</string> + <string>Screen sound</string> </property> </widget> @@ -65,38 +80,101 @@ <property stdset="1"> <name>name</name> - <cstring>touchsound</cstring> + <cstring>keysound</cstring> </property> <property stdset="1"> <name>text</name> - <string>Screen sound</string> + <string>Keyboard sound</string> </property> </widget> <widget> + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout11</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_2</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>dblClickLabel</cstring> + <cstring>PixmapLabel1_2</cstring> </property> <property stdset="1"> - <name>text</name> - <string>Double Click Volume runs:</string> + <name>pixmap</name> + <pixmap>image0</pixmap> + </property> + <property stdset="1"> + <name>scaledContents</name> + <bool>false</bool> </property> </widget> <widget> - <class>QLineEdit</class> + <class>QLabel</class> <property stdset="1"> <name>name</name> - <cstring>dblClickRuns</cstring> + <cstring>TextLabel1_2</cstring> </property> <property stdset="1"> <name>text</name> - <string></string> + <string>Loud</string> </property> </widget> + <spacer> + <property> + <name>name</name> + <cstring>Spacer3_2</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> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> - <cstring>Layout14</cstring> + <cstring>Layout11</cstring> </property> <hbox> @@ -164,42 +242,12 @@ </vbox> </widget> - <widget> - <class>QLayoutWidget</class> - <property stdset="1"> - <name>name</name> - <cstring>Layout13</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> - </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_2</cstring> + <cstring>Spacer5_2</cstring> </property> <property stdset="1"> <name>orientation</name> - <enum>Horizontal</enum> + <enum>Vertical</enum> </property> <property stdset="1"> @@ -216,56 +264,42 @@ </spacer> <widget> - <class>QLabel</class> + <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> - <cstring>PixmapLabel1_2</cstring> + <cstring>Layout8</cstring> </property> + <vbox> <property stdset="1"> - <name>pixmap</name> - <pixmap>image0</pixmap> + <name>margin</name> + <number>0</number> </property> <property stdset="1"> - <name>scaledContents</name> - <bool>false</bool> + <name>spacing</name> + <number>6</number> </property> - </widget> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> - <cstring>TextLabel1_2</cstring> + <cstring>micLabel</cstring> </property> <property stdset="1"> <name>text</name> - <string>Loud</string> + <string>Microphone</string> </property> </widget> - <spacer> - <property> + <widget> + <class>QSlider</class> + <property stdset="1"> <name>name</name> - <cstring>Spacer3_2</cstring> + <cstring>mic</cstring> </property> <property stdset="1"> - <name>orientation</name> - <enum>Horizontal</enum> + <name>maxValue</name> + <number>100</number> </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>Spacer5_2</cstring> + <name>value</name> + <number>50</number> </property> <property stdset="1"> @@ -274,15 +308,16 @@ </property> <property stdset="1"> - <name>sizeType</name> - <enum>Expanding</enum> + <name>tickmarks</name> + <enum>Right</enum> </property> - <property> - <name>sizeHint</name> - <size> - <width>20</width> - <height>20</height> - </size> + <property stdset="1"> + <name>tickInterval</name> + <number>5</number> </property> - </spacer> + </widget> + </vbox> + </widget> + </hbox> + </widget> <widget> <class>QLayoutWidget</class> @@ -376,5 +411,39 @@ <property stdset="1"> <name>name</name> - <cstring>Layout8</cstring> + <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> + <property stdset="1"> + <name>name</name> + <cstring>GroupBox1</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> </property> <vbox> @@ -391,24 +460,48 @@ <property stdset="1"> <name>name</name> - <cstring>micLabel</cstring> + <cstring>sampleRateLabel</cstring> </property> <property stdset="1"> <name>text</name> - <string>Microphone</string> + <string>Rate (5k-44k)</string> </property> </widget> <widget> - <class>QSlider</class> + <class>QLineEdit</class> <property stdset="1"> <name>name</name> - <cstring>mic</cstring> + <cstring>sampleRate</cstring> </property> + </widget> + <widget> + <class>QCheckBox</class> <property stdset="1"> - <name>maxValue</name> - <number>100</number> + <name>name</name> + <cstring>stereoCheckBox</cstring> </property> <property stdset="1"> - <name>value</name> - <number>50</number> + <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> + <spacer> + <property> + <name>name</name> + <cstring>Spacer9</cstring> </property> <property stdset="1"> @@ -417,18 +510,40 @@ </property> <property stdset="1"> - <name>tickmarks</name> - <enum>Right</enum> + <name>sizeType</name> + <enum>Expanding</enum> </property> - <property stdset="1"> - <name>tickInterval</name> - <number>5</number> + <property> + <name>sizeHint</name> + <size> + <width>20</width> + <height>20</height> + </size> </property> - </widget> + </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> </widget> - </vbox> - </widget> </grid> </widget> |