From 68d08b102aef5f73f2f1b3c5d693c26647f48c33 Mon Sep 17 00:00:00 2001 From: jeremy Date: Mon, 11 Feb 2002 04:36:18 +0000 Subject: 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. --- 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 @@ -35,8 +35,11 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl ) mic->setValue(100-config.readNumEntry("Mic")); 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))); connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int))); @@ -51,6 +54,11 @@ void SoundSettings::reject() setVolume(100-config.readNumEntry("Volume")); 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(); } @@ -62,8 +70,15 @@ void SoundSettings::accept() config.writeEntry("Mic",100-mic->value()); 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 @@ -11,7 +11,7 @@ 0 0 - 376 + 372 441 @@ -38,9 +38,9 @@ QLayoutWidget name - Layout8 + Layout30 - + margin 0 @@ -50,56 +50,12 @@ 6 - QCheckBox - - name - keysound - - - text - Keyboard sound - - - - QCheckBox - - name - touchsound - - - text - Screen sound - - - - QLabel - - name - dblClickLabel - - - text - Double Click Volume runs: - - - - QLineEdit - - name - dblClickRuns - - - text - - - - QLayoutWidget name - Layout14 + Layout24 - + margin 0 @@ -109,12 +65,34 @@ 6 + QCheckBox + + name + touchsound + + + text + Screen sound + + + + QCheckBox + + name + keysound + + + text + Keyboard sound + + + QLayoutWidget name - Layout7 + Layout11 - + margin 0 @@ -123,53 +101,83 @@ spacing 6 + + + name + Spacer3_2_2 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + QLabel name - volLabel + PixmapLabel1_2 - text - Volume + pixmap + image0 + + + scaledContents + false - QSlider + QLabel name - volume + TextLabel1_2 - maxValue - 100 + text + Loud - - value - 50 + + + + name + Spacer3_2 orientation - Vertical + Horizontal - tickmarks - Right + sizeType + Expanding - - tickInterval - 5 + + sizeHint + + 20 + 20 + - - + + QLayoutWidget name - Layout13 + Layout11 - + margin 0 @@ -182,9 +190,9 @@ QLayoutWidget name - Layout11 + Layout7 - + margin 0 @@ -193,75 +201,45 @@ spacing 6 - - - name - Spacer3_2_2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - QLabel name - PixmapLabel1_2 + volLabel - pixmap - image0 - - - scaledContents - false + text + Volume - QLabel + QSlider name - TextLabel1_2 + volume - text - Loud + maxValue + 100 - - - - name - Spacer3_2 + + value + 50 orientation - Horizontal + Vertical - sizeType - Expanding + tickmarks + Right - - sizeHint - - 20 - 20 - + + tickInterval + 5 - - + + @@ -288,9 +266,9 @@ QLayoutWidget name - Layout12 + Layout8 - + margin 0 @@ -299,85 +277,55 @@ spacing 6 - - - name - Spacer3_2_3 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - QLabel name - PixmapLabel2_2 - - - pixmap - image1 + micLabel - scaledContents - false + text + Microphone - QLabel + QSlider name - TextLabel2_2 + mic - text - Silent + maxValue + 100 - - - - name - Spacer2_2 + + value + 50 orientation - Horizontal + Vertical - sizeType - Expanding + tickmarks + Right - - sizeHint - - 20 - 20 - + + tickInterval + 5 - - + + - + QLayoutWidget name - Layout8 + Layout12 - + margin 0 @@ -386,49 +334,216 @@ spacing 6 + + + name + Spacer3_2_3 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + QLabel name - micLabel + PixmapLabel2_2 - text - Microphone + pixmap + image1 + + + scaledContents + false - QSlider + QLabel name - mic + TextLabel2_2 - maxValue - 100 + text + Silent - - value - 50 + + + + name + Spacer2_2 orientation - Vertical + Horizontal - tickmarks - Right + sizeType + Expanding + + sizeHint + + 20 + 20 + + + + + + + + + QLayoutWidget + + name + Layout29 + + + + margin + 0 + + + spacing + 6 + + + QGroupBox + + name + GroupBox1 + + + title + Record Defaults + + + + margin + 11 + + + spacing + 6 + + + QLayoutWidget - tickInterval - 5 + name + Layout28 + + + margin + 0 + + + spacing + 6 + + + QLabel + + name + sampleRateLabel + + + text + Rate (5k-44k) + + + + QLineEdit + + name + sampleRate + + + + QCheckBox + + name + stereoCheckBox + + + text + Stereo + + + + QCheckBox + + name + sixteenBitCheckBox + + + text + 16 bit + + + - + - + + + name + Spacer9 + + + orientation + Vertical + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + - + + + name + Spacer10 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + -- cgit v0.9.0.2