Diffstat (limited to 'noncore/settings/sound/soundsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 84 |
1 files changed, 46 insertions, 38 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index c1918de..cdee87c 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp | |||
@@ -19,2 +19,3 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | |||
20 | #include "soundsettings.h" | 21 | #include "soundsettings.h" |
@@ -35,23 +36,26 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl ) | |||
35 | { | 36 | { |
36 | Config config( "Sound" ); | 37 | Config config( "qpe"); |
37 | config.setGroup( "System" ); | 38 | config.setGroup( "Volume" ); |
38 | volume->setValue(100-config.readNumEntry("Volume")); | 39 | volume->setValue(100-config.readNumEntry("VolumePercent")); |
39 | mic->setValue(100-config.readNumEntry("Mic")); | 40 | mic->setValue(100-config.readNumEntry("Mic")); |
40 | touchsound->setChecked(config.readBoolEntry("Touch")); | 41 | // touchsound->setChecked(config.readBoolEntry("TouchSound")); |
41 | keysound->setChecked(config.readBoolEntry("Key")); | 42 | // keysound->setChecked(config.readBoolEntry("KeySound")); |
42 | AlertCheckBox->setChecked(config.readBoolEntry("Alert")); | 43 | Config cfg("Vmemo"); |
44 | AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); | ||
43 | 45 | ||
44 | config.setGroup("Record"); | 46 | cfg.setGroup("Record"); |
45 | int rate=config.readNumEntry("SampleRate", 22050); | 47 | int rate=config.readNumEntry("SampleRate", 22050); |
46 | if(rate == 11025) | 48 | if(rate == 8000) |
47 | sampleRate->setCurrentItem(0); | 49 | sampleRate->setCurrentItem(0); |
48 | else if(rate == 22050) | 50 | else if(rate == 11025) |
49 | sampleRate->setCurrentItem(1); | 51 | sampleRate->setCurrentItem(1); |
50 | else if(rate == 32000) | 52 | else if(rate == 22050) |
51 | sampleRate->setCurrentItem(2); | 53 | sampleRate->setCurrentItem(2); |
54 | else if(rate == 33075) | ||
55 | sampleRate->setCurrentItem(3); | ||
52 | else if(rate==44100) | 56 | else if(rate==44100) |
53 | sampleRate->setCurrentItem(2); | 57 | sampleRate->setCurrentItem(4); |
54 | 58 | ||
55 | stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0)); | 59 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); |
56 | sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 1)); | 60 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); |
57 | 61 | ||
@@ -68,6 +72,6 @@ void SoundSettings::reject() | |||
68 | { | 72 | { |
69 | Config config( "Sound" ); | 73 | Config config( "qpe"); |
70 | config.setGroup( "System" ); | 74 | config.setGroup( "Volume"); |
71 | 75 | ||
72 | setVolume(100-config.readNumEntry("Volume")); | 76 | setVolume(100-config.readNumEntry("VolumePercent")); |
73 | setMic(100-config.readNumEntry("Mic")); | 77 | setMic(100-config.readNumEntry("Mic")); |
@@ -92,9 +96,11 @@ void SoundSettings::accept() | |||
92 | { | 96 | { |
93 | Config config( "Sound" ); | 97 | Config config( "qpe" ); |
94 | config.setGroup( "System" ); | 98 | config.setGroup( "Volume" ); |
95 | config.writeEntry("Volume",100-volume->value()); | 99 | config.writeEntry("VolumePercent",100-volume->value()); |
96 | config.writeEntry("Mic",100-mic->value()); | 100 | config.writeEntry("Mic",100-mic->value()); |
97 | config.writeEntry("Touch",touchsound->isChecked()); | 101 | // config.writeEntry("TouchSound",touchsound->isChecked()); |
98 | config.writeEntry("Key",keysound->isChecked()); | 102 | // config.writeEntry("KeySound",keysound->isChecked()); |
99 | config.writeEntry("Alert",AlertCheckBox->isChecked()); | 103 | |
104 | Config cfg("Vmemo"); | ||
105 | cfg.writeEntry("Alert",AlertCheckBox->isChecked()); | ||
100 | setVolume(volume->value()); | 106 | setVolume(volume->value()); |
@@ -102,7 +108,9 @@ void SoundSettings::accept() | |||
102 | 108 | ||
103 | config.setGroup("Record"); | 109 | cfg.setGroup("Record"); |
104 | config.writeEntry("SampleRate",sampleRate->currentText()); | 110 | cfg.writeEntry("SampleRate",sampleRate->currentText()); |
105 | config.writeEntry("Stereo",stereoCheckBox->isChecked()); | 111 | cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); |
106 | config.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); | 112 | cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); |
107 | 113 | // Config cfg( "VMemo" ); | |
114 | // cfg.setGroup( "Defaults" ); | ||
115 | // cfg.writeEntry( "hideIcon", HideIcon_CheckBox->isChecked()); | ||
108 | QDialog::accept(); | 116 | QDialog::accept(); |
@@ -112,5 +120,5 @@ void SoundSettings::setVolume(int v) | |||
112 | { | 120 | { |
113 | Config config( "Sound" ); | 121 | Config config( "qpe" ); |
114 | config.setGroup( "System" ); | 122 | config.setGroup( "Volume" ); |
115 | config.writeEntry("Volume",100-v); | 123 | config.writeEntry("VolumePercent",100-v); |
116 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) | 124 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) |
@@ -122,4 +130,4 @@ void SoundSettings::setMic(int m) | |||
122 | { | 130 | { |
123 | Config config( "Sound" ); | 131 | Config config( "qpe" ); |
124 | config.setGroup( "System" ); | 132 | config.setGroup( "Volume" ); |
125 | config.writeEntry("Mic",100-m); | 133 | config.writeEntry("Mic",100-m); |
@@ -132,5 +140,5 @@ void SoundSettings::volumeChanged( bool ) | |||
132 | { | 140 | { |
133 | Config config( "Sound" ); | 141 | Config config( "qpe" ); |
134 | config.setGroup( "System" ); | 142 | config.setGroup( "Volume" ); |
135 | volume->setValue(100-config.readNumEntry("Volume")); | 143 | volume->setValue(100-config.readNumEntry("VolumePercent")); |
136 | } | 144 | } |
@@ -139,4 +147,4 @@ void SoundSettings::micChanged( bool ) | |||
139 | { | 147 | { |
140 | Config config( "Sound" ); | 148 | Config config( "qpe" ); |
141 | config.setGroup( "System" ); | 149 | config.setGroup( "Volume" ); |
142 | mic->setValue(100-config.readNumEntry("Mic")); | 150 | mic->setValue(100-config.readNumEntry("Mic")); |
@@ -162,3 +170,3 @@ void SoundSettings::updateStorageCombo() { | |||
162 | void SoundSettings::setLocation(const QString & string) { | 170 | void SoundSettings::setLocation(const QString & string) { |
163 | Config config( "Sound" ); | 171 | Config config( "Vmemo" ); |
164 | config.setGroup( "System" ); | 172 | config.setGroup( "System" ); |