From 343f008ab9a6905ff6f9c953279e84cc581ea8b6 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Thu, 23 May 2002 18:57:58 +0000 Subject: removed silly functions that arent called --- (limited to 'noncore/settings/sound/soundsettings.cpp') diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index ed601cf..40b8b87 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp @@ -20,6 +20,7 @@ #include "soundsettings.h" +#include #include #include #include @@ -41,6 +42,7 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl ) // touchsound->setChecked(config.readBoolEntry("TouchSound")); // keysound->setChecked(config.readBoolEntry("KeySound")); Config cfg("Vmemo"); + connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); cfg.setGroup("Record"); @@ -68,55 +70,56 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl ) // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); } -void SoundSettings::reject() -{ - qDebug("here"); - Config config( "qpe"); - config.setGroup( "Volume"); - - setVolume(100-config.readNumEntry("VolumePercent")); - setMic(100-config.readNumEntry("Mic")); - -// 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 == 32000) -// sampleRate->setCurrentItem(2); -// else if(rate==44100) -// sampleRate->setCurrentItem(3); -// stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0)); -// sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0)); - ::exit(-1); -// QDialog::reject(); -} - -void SoundSettings::accept() -{ - Config config( "qpe" ); - config.setGroup( "Volume" ); - config.writeEntry("VolumePercent",100-volume->value()); - config.writeEntry("Mic",100-mic->value()); -// config.writeEntry("TouchSound",touchsound->isChecked()); -// config.writeEntry("KeySound",keysound->isChecked()); - - Config cfg("Vmemo"); - cfg.writeEntry("Alert",AlertCheckBox->isChecked()); - setVolume(volume->value()); - setMic(mic->value()); - - cfg.setGroup("Record"); - cfg.writeEntry("SampleRate",sampleRate->currentText()); - cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); - cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); -// Config cfg( "VMemo" ); -// cfg.setGroup( "Defaults" ); -// cfg.writeEntry( "hideIcon", HideIcon_CheckBox->isChecked()); -// QDialog::accept(); - ::exit(0); -} +// void SoundSettings::reject() +// { +// qDebug("reject"); +// Config config( "qpe"); +// config.setGroup( "Volume"); + +// setVolume(100-config.readNumEntry("VolumePercent")); +// setMic(100-config.readNumEntry("Mic")); + +// // 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 == 32000) +// // sampleRate->setCurrentItem(2); +// // else if(rate==44100) +// // sampleRate->setCurrentItem(3); +// // stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0)); +// // sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0)); +// qDebug("QDialog::reject();"); +// ::exit(-1); +// } + +// void SoundSettings::accept() +// { +// qDebug("accept"); +// Config config( "qpe" ); +// config.setGroup( "Volume" ); +// config.writeEntry("VolumePercent",100-volume->value()); +// config.writeEntry("Mic",100-mic->value()); +// // config.writeEntry("TouchSound",touchsound->isChecked()); +// // config.writeEntry("KeySound",keysound->isChecked()); + +// Config cfg("Vmemo"); +// cfg.writeEntry("Alert",AlertCheckBox->isChecked()); +// setVolume(volume->value()); +// setMic(mic->value()); + +// cfg.setGroup("Record"); +// cfg.writeEntry("SampleRate",sampleRate->currentText()); +// cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); +// cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); +// // Config cfg( "VMemo" ); +// // cfg.setGroup( "Defaults" ); +// // cfg.writeEntry( "hideIcon", HideIcon_CheckBox->isChecked()); +// qDebug("QDialog::accept();"); +// ::exit(0); +// } void SoundSettings::setVolume(int v) { @@ -175,3 +178,23 @@ void SoundSettings::setLocation(const QString & string) { config.writeEntry("RecLocation",string); } + +void SoundSettings::cleanUp() { + qDebug("cleanup"); + Config config( "qpe" ); + config.setGroup( "Volume" ); + config.writeEntry("VolumePercent",100-volume->value()); + config.writeEntry("Mic",100-mic->value()); +// config.writeEntry("TouchSound",touchsound->isChecked()); +// config.writeEntry("KeySound",keysound->isChecked()); + + Config cfg("Vmemo"); + cfg.writeEntry("Alert",AlertCheckBox->isChecked()); + setVolume(volume->value()); + setMic(mic->value()); + + cfg.setGroup("Record"); + cfg.writeEntry("SampleRate",sampleRate->currentText()); + cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); + cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); +} -- cgit v0.9.0.2