-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 17 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettings.h | 1 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.cpp | 8 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.h | 2 |
4 files changed, 24 insertions, 4 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 | |||
@@ -105,17 +105,25 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) | |||
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 | ||
@@ -163,9 +171,8 @@ void SoundSettings::cleanUp() { | |||
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 | } |
@@ -204,4 +211,10 @@ void SoundSettings::setSizeLimitButton(const QString &index) { | |||
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 | } | ||
diff --git a/noncore/settings/sound/soundsettings.h b/noncore/settings/sound/soundsettings.h index 0f3605e..71ce6f5 100644 --- a/noncore/settings/sound/soundsettings.h +++ b/noncore/settings/sound/soundsettings.h | |||
@@ -43,8 +43,9 @@ private slots: | |||
43 | void setSizeLimitButton(const QString &); | 43 | void setSizeLimitButton(const QString &); |
44 | void setLocation(const QString &); | 44 | void setLocation(const QString &); |
45 | void cleanUp(); | 45 | void cleanUp(); |
46 | void restartOpie(bool); | 46 | void restartOpie(bool); |
47 | void slotAdpcm(bool); | ||
47 | }; | 48 | }; |
48 | 49 | ||
49 | 50 | ||
50 | #endif // SOUNDSETTINGS_H | 51 | #endif // SOUNDSETTINGS_H |
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp index af794ba..f283119 100644 --- a/noncore/settings/sound/soundsettingsbase.cpp +++ b/noncore/settings/sound/soundsettingsbase.cpp | |||
@@ -160,12 +160,16 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m | |||
160 | restartCheckBox= new QCheckBox( this, "restartCheck" ); | 160 | restartCheckBox= new QCheckBox( this, "restartCheck" ); |
161 | restartCheckBox->setText( tr( "Restart Opie if needed" ) ); | 161 | restartCheckBox->setText( tr( "Restart Opie if needed" ) ); |
162 | 162 | ||
163 | SoundSettingsBaseLayout->addMultiCellWidget( restartCheckBox , 9, 9, 0, 0, 1); | 163 | SoundSettingsBaseLayout->addMultiCellWidget( restartCheckBox , 9, 9, 0, 0, 1); |
164 | 164 | ||
165 | adpcmCheckBox = new QCheckBox( this, "adpcmCheck" ); | ||
166 | adpcmCheckBox->setText( tr( "Use ADPCM compression" ) ); | ||
167 | |||
168 | SoundSettingsBaseLayout->addMultiCellWidget( adpcmCheckBox , 10, 10, 0, 0, 1); | ||
165 | 169 | ||
166 | QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); | 170 | QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); |
167 | SoundSettingsBaseLayout->addItem( spacer4, 9, 0 ); | 171 | SoundSettingsBaseLayout->addItem( spacer4, 10, 0 ); |
168 | } | 172 | } |
169 | 173 | ||
170 | /* | 174 | /* |
171 | * Destroys the object and frees any allocated resources | 175 | * Destroys the object and frees any allocated resources |
diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h index e6bc186..48c31e8 100644 --- a/noncore/settings/sound/soundsettingsbase.h +++ b/noncore/settings/sound/soundsettingsbase.h | |||
@@ -49,8 +49,10 @@ public: | |||
49 | QComboBox* LocationComboBox; | 49 | QComboBox* LocationComboBox; |
50 | QComboBox* keyComboBox; | 50 | QComboBox* keyComboBox; |
51 | QComboBox* timeLimitComboBox; | 51 | QComboBox* timeLimitComboBox; |
52 | QCheckBox *restartCheckBox; | 52 | QCheckBox *restartCheckBox; |
53 | QCheckBox *adpcmCheckBox; | ||
54 | |||
53 | bool keyReset; | 55 | bool keyReset; |
54 | protected: | 56 | protected: |
55 | QGridLayout* SoundSettingsBaseLayout; | 57 | QGridLayout* SoundSettingsBaseLayout; |
56 | protected slots: | 58 | protected slots: |