summaryrefslogtreecommitdiff
path: root/noncore/settings/sound/soundsettings.cpp
Unidiff
Diffstat (limited to 'noncore/settings/sound/soundsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp107
1 files changed, 0 insertions, 107 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index a163d38..99fccf7 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -47,6 +47,2 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
47 config.setGroup( "Volume" ); 47 config.setGroup( "Volume" );
48 volume->setValue(100-config.readNumEntry("VolumePercent"));
49 mic->setValue(100-config.readNumEntry("Mic"));
50// touchsound->setChecked(config.readBoolEntry("TouchSound"));
51// keysound->setChecked(config.readBoolEntry("KeySound"));
52 Config cfg("Vmemo"); 48 Config cfg("Vmemo");
@@ -102,3 +98,2 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
102 98
103
104 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); 99 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1));
@@ -109,8 +104,2 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
109 updateStorageCombo(); 104 updateStorageCombo();
110
111 connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int)));
112 connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int)));
113 connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) );
114 connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) );
115
116 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); 105 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &)));
@@ -120,88 +109,2 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
120} 109}
121
122// void SoundSettings::reject()
123// {
124// qDebug("reject");
125// Config config( "qpe");
126// config.setGroup( "Volume");
127
128// setVolume(100-config.readNumEntry("VolumePercent"));
129// setMic(100-config.readNumEntry("Mic"));
130
131// // config.setGroup("Record");
132// // int rate=config.readNumEntry("SampleRate", 11025);
133// // if(rate == 11025)
134// // sampleRate->setCurrentItem(0);
135// // else if(rate == 22050)
136// // sampleRate->setCurrentItem(1);
137// // else if(rate == 32000)
138// // sampleRate->setCurrentItem(2);
139// // else if(rate==44100)
140// // sampleRate->setCurrentItem(3);
141// // stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0));
142// // sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0));
143// qDebug("QDialog::reject();");
144// ::exit(-1);
145// }
146
147// void SoundSettings::accept()
148// {
149// qDebug("accept");
150// Config config( "qpe" );
151// config.setGroup( "Volume" );
152// config.writeEntry("VolumePercent",100-volume->value());
153// config.writeEntry("Mic",100-mic->value());
154// // config.writeEntry("TouchSound",touchsound->isChecked());
155// // config.writeEntry("KeySound",keysound->isChecked());
156
157// Config cfg("Vmemo");
158// cfg.writeEntry("Alert",AlertCheckBox->isChecked());
159// setVolume(volume->value());
160// setMic(mic->value());
161
162// cfg.setGroup("Record");
163// cfg.writeEntry("SampleRate",sampleRate->currentText());
164// cfg.writeEntry("Stereo",stereoCheckBox->isChecked());
165// cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
166// // Config cfg( "VMemo" );
167// // cfg.setGroup( "Defaults" );
168// // cfg.writeEntry( "hideIcon", HideIcon_CheckBox->isChecked());
169// qDebug("QDialog::accept();");
170// ::exit(0);
171// }
172
173void SoundSettings::setVolume(int v)
174{
175 Config config( "qpe" );
176 config.setGroup( "Volume" );
177 config.writeEntry("VolumePercent",100-v);
178#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
179 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
180#endif
181}
182
183void SoundSettings::setMic(int m)
184{
185 Config config( "qpe" );
186 config.setGroup( "Volume" );
187 config.writeEntry("Mic",100-m);
188#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
189 QCopEnvelope( "QPE/System", "micChange(bool)" ) << FALSE;
190#endif
191}
192
193void SoundSettings::volumeChanged( bool )
194{
195 Config config( "qpe" );
196 config.setGroup( "Volume" );
197 volume->setValue(100-config.readNumEntry("VolumePercent"));
198}
199
200void SoundSettings::micChanged( bool )
201{
202 Config config( "qpe" );
203 config.setGroup( "Volume" );
204 mic->setValue(100-config.readNumEntry("Mic"));
205}
206
207void SoundSettings::updateStorageCombo() { 110void SoundSettings::updateStorageCombo() {
@@ -246,14 +149,4 @@ void SoundSettings::setLocation(const QString & string) {
246void SoundSettings::cleanUp() { 149void SoundSettings::cleanUp() {
247 qDebug("cleanup");
248 Config config( "qpe" );
249 config.setGroup( "Volume" );
250 config.writeEntry("VolumePercent",100-volume->value());
251 config.writeEntry("Mic",100-mic->value());
252// config.writeEntry("TouchSound",touchsound->isChecked());
253// config.writeEntry("KeySound",keysound->isChecked());
254
255 Config cfg("Vmemo"); 150 Config cfg("Vmemo");
256 cfg.writeEntry("Alert",AlertCheckBox->isChecked()); 151 cfg.writeEntry("Alert",AlertCheckBox->isChecked());
257 setVolume(volume->value());
258 setMic(mic->value());
259 152