From 2f18edca6cc3539298deccee89e6f4dd7a2570a2 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Sun, 17 Mar 2002 13:08:37 +0000 Subject: changed line edit to combo, and changed labels and layout --- (limited to 'noncore') 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 @@ -25,6 +25,8 @@ #include #include #include +#include + SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl ) : SoundSettingsBase( parent, name, TRUE, fl ) @@ -32,19 +34,26 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl ) Config config( "Sound" ); config.setGroup( "System" ); volume->setValue(100-config.readNumEntry("Volume")); - mic->setValue(100-config.readNumEntry("Mic")); + mic->setValue(100-config.readNumEntry("Mic")); touchsound->setChecked(config.readBoolEntry("Touch")); keysound->setChecked(config.readBoolEntry("Key")); - 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)); connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int))); 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) ) ); } void SoundSettings::reject() @@ -52,12 +61,18 @@ void SoundSettings::reject() Config config( "Sound" ); config.setGroup( "System" ); 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)); QDialog::reject(); } @@ -72,13 +87,13 @@ void SoundSettings::accept() config.writeEntry("Key",keysound->isChecked()); 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(); } @@ -88,7 +103,7 @@ void SoundSettings::setVolume(int v) config.setGroup( "System" ); config.writeEntry("Volume",100-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 @@ -11,8 +11,8 @@ 0 0 - 372 - 441 + 286 + 338 @@ -34,13 +34,13 @@ spacing 6 - + QLayoutWidget name - Layout30 + Layout9 - + margin 0 @@ -53,7 +53,7 @@ QLayoutWidget name - Layout24 + Layout8 @@ -65,6 +65,102 @@ 6 + QGroupBox + + name + GroupBox1 + + + title + Vmemo + + + + margin + 11 + + + spacing + 6 + + + QLayoutWidget + + name + Layout15 + + + + margin + 0 + + + spacing + 6 + + + QLabel + + name + sampleRateLabel + + + text + Sample Rate + + + + QComboBox + + + text + 11025 + + + + + text + 22050 + + + + + text + 44100 + + + + name + sampleRate + + + + QCheckBox + + name + stereoCheckBox + + + text + Stereo + + + + QCheckBox + + name + sixteenBitCheckBox + + + text + 16 bit + + + + + + + QCheckBox name @@ -72,7 +168,7 @@ text - Screen sound + Screen sounds @@ -83,14 +179,73 @@ text - Keyboard sound + Keyboard sounds + + + + + name + Spacer10 + + + orientation + Vertical + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + + + QGroupBox + + name + GroupBox3 + + + title + Levels + + + + margin + 11 + + + spacing + 6 + + + QLayoutWidget + + name + Layout10 + + + + margin + 0 + + + spacing + 6 + QLayoutWidget name - Layout11 + Layout16 @@ -104,7 +259,7 @@ name - Spacer3_2_2 + Spacer37 orientation @@ -151,7 +306,7 @@ name - Spacer3_2 + Spacer7 orientation @@ -175,7 +330,7 @@ QLayoutWidget name - Layout11 + Layout13 @@ -187,68 +342,24 @@ 6 - QLayoutWidget + QLabel name - Layout7 + volLabel + + + text + Output - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - volLabel - - - text - Volume - - - - QSlider - - name - volume - - - maxValue - 100 - - - value - 50 - - - orientation - Vertical - - - tickmarks - Right - - - tickInterval - 5 - - - name - Spacer5_2 + Spacer20 orientation - Vertical + Horizontal sizeType @@ -263,60 +374,37 @@ - QLayoutWidget + QLabel name - Layout8 + micLabel + + + text + Mic - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - micLabel - - - text - Microphone - - - - QSlider - - name - mic - - - maxValue - 100 - - - value - 50 - - - orientation - Vertical - - - tickmarks - Right - - - tickInterval - 5 - - - + + + name + Spacer17 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + @@ -334,10 +422,37 @@ spacing 6 + + QSlider + + name + volume + + + maxValue + 100 + + + value + 50 + + + orientation + Vertical + + + tickmarks + Right + + + tickInterval + 5 + + name - Spacer3_2_3 + Spacer19 orientation @@ -356,35 +471,36 @@ - QLabel + QSlider name - PixmapLabel2_2 + mic - pixmap - image1 + maxValue + 100 - scaledContents - false + value + 50 - - - QLabel - name - TextLabel2_2 + orientation + Vertical - text - Silent + tickmarks + Right + + + tickInterval + 5 name - Spacer2_2 + Spacer18 orientation @@ -404,146 +520,94 @@ - - - - QLayoutWidget - - name - Layout29 - - - - margin - 0 - - - spacing - 6 - - QGroupBox + QLayoutWidget name - GroupBox1 - - - title - Record Defaults + Layout17 - + margin - 11 + 0 spacing 6 - - QLayoutWidget + + + name + Spacer38 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + QLabel name - Layout28 + PixmapLabel2_2 + + + pixmap + image1 + + + scaledContents + false - - - 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 - - - - + + QLabel + + name + TextLabel2_2 + + + text + Silent + + + + + name + Spacer8 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + - - - name - Spacer9 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - name - Spacer10 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - + -- cgit v0.9.0.2