Diffstat (limited to 'noncore/settings/sound/soundsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index 09d2e92..4bc86fa 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp | |||
@@ -103,21 +103,29 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) | |||
103 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); | 103 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); |
104 | 104 | ||
105 | cfg.setGroup("Defaults"); | 105 | cfg.setGroup("Defaults"); |
106 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); | 106 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); |
107 | 107 | ||
108 | updateStorageCombo(); | 108 | updateStorageCombo(); |
109 | |||
110 | Config vmCfg("Vmemo"); | ||
111 | vmCfg.setGroup("Defaults"); | ||
112 | adpcmCheckBox->setChecked( vmCfg.readBoolEntry("use_ADPCM", 0)); | ||
113 | |||
109 | connect( LocationComboBox,SIGNAL(activated(const QString &)), this, | 114 | connect( LocationComboBox,SIGNAL(activated(const QString &)), this, |
110 | SLOT( setLocation(const QString &))); | 115 | SLOT( setLocation(const QString &))); |
111 | connect( keyComboBox,SIGNAL(activated( int)), this, | 116 | connect( keyComboBox,SIGNAL(activated( int)), this, |
112 | SLOT( setKeyButton( int))); | 117 | SLOT( setKeyButton( int))); |
113 | connect( timeLimitComboBox,SIGNAL(activated( const QString &)), this, | 118 | connect( timeLimitComboBox,SIGNAL(activated( const QString &)), this, |
114 | SLOT( setSizeLimitButton(const QString &))); | 119 | SLOT( setSizeLimitButton(const QString &))); |
115 | connect( restartCheckBox,SIGNAL( toggled( bool)), this, | 120 | connect( restartCheckBox,SIGNAL( toggled( bool)), this, |
116 | SLOT( restartOpie( bool))); | 121 | SLOT( restartOpie( bool))); |
117 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 122 | connect( adpcmCheckBox,SIGNAL( toggled( bool)), this, |
123 | SLOT( slotAdpcm( bool))); | ||
124 | |||
125 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | ||
118 | } | 126 | } |
119 | 127 | ||
120 | void SoundSettings::updateStorageCombo() { | 128 | void SoundSettings::updateStorageCombo() { |
121 | 129 | ||
122 | Config config( "Vmemo" ); | 130 | Config config( "Vmemo" ); |
123 | config.setGroup( "System" ); | 131 | config.setGroup( "System" ); |
@@ -161,13 +169,12 @@ void SoundSettings::cleanUp() { | |||
161 | cfg.writeEntry("Alert",AlertCheckBox->isChecked()); | 169 | cfg.writeEntry("Alert",AlertCheckBox->isChecked()); |
162 | 170 | ||
163 | cfg.setGroup("Record"); | 171 | cfg.setGroup("Record"); |
164 | cfg.writeEntry("SampleRate",sampleRate->currentText()); | 172 | cfg.writeEntry("SampleRate",sampleRate->currentText()); |
165 | cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); | 173 | cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); |
166 | cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); | 174 | cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); |
167 | |||
168 | if(keyReset && noWarning) { | 175 | if(keyReset && noWarning) { |
169 | QCopEnvelope ("QPE/System", "restart()"); | 176 | QCopEnvelope ("QPE/System", "restart()"); |
170 | } | 177 | } |
171 | } | 178 | } |
172 | 179 | ||
173 | void SoundSettings::setKeyButton( int index) { | 180 | void SoundSettings::setKeyButton( int index) { |
@@ -202,6 +209,12 @@ void SoundSettings::setSizeLimitButton(const QString &index) { | |||
202 | } | 209 | } |
203 | 210 | ||
204 | void SoundSettings::restartOpie(bool b) { | 211 | void SoundSettings::restartOpie(bool b) { |
205 | noWarning=b; | 212 | noWarning=b; |
206 | } | 213 | } |
207 | 214 | ||
215 | void SoundSettings::slotAdpcm(bool b) { | ||
216 | Config vmCfg("Vmemo"); | ||
217 | vmCfg.setGroup("Defaults"); | ||
218 | vmCfg.writeEntry("use_ADPCM", b); | ||
219 | vmCfg.write(); | ||
220 | } | ||