summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-05-23 18:57:58 (UTC)
committer llornkcor <llornkcor>2002-05-23 18:57:58 (UTC)
commit343f008ab9a6905ff6f9c953279e84cc581ea8b6 (patch) (side-by-side diff)
tree8372d7ca528d4895ae5b73100036f5a0a06170d6
parent80acaa41e768bf4492dacdaf0a2cf19dff89b500 (diff)
downloadopie-343f008ab9a6905ff6f9c953279e84cc581ea8b6.zip
opie-343f008ab9a6905ff6f9c953279e84cc581ea8b6.tar.gz
opie-343f008ab9a6905ff6f9c953279e84cc581ea8b6.tar.bz2
removed silly functions that arent called
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp121
-rw-r--r--noncore/settings/sound/soundsettings.h6
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp3
-rw-r--r--noncore/settings/sound/soundsettingsbase.h8
4 files changed, 82 insertions, 56 deletions
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
@@ -21,4 +21,5 @@
#include "soundsettings.h"
+#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
@@ -42,4 +43,5 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
// keysound->setChecked(config.readBoolEntry("KeySound"));
Config cfg("Vmemo");
+ connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
AlertCheckBox->setChecked(cfg.readBoolEntry("Alert"));
@@ -69,53 +71,54 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
}
-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)
@@ -176,2 +179,22 @@ void SoundSettings::setLocation(const QString & 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());
+}
diff --git a/noncore/settings/sound/soundsettings.h b/noncore/settings/sound/soundsettings.h
index aec7614..cbec724 100644
--- a/noncore/settings/sound/soundsettings.h
+++ b/noncore/settings/sound/soundsettings.h
@@ -33,11 +33,11 @@ public:
protected:
- void accept();
- void reject();
+/* void accept(); */
+/* void reject(); */
void updateStorageCombo();
private slots:
void setLocation(const QString &);
-
+ void cleanUp();
void setVolume(int);
void setMic(int);
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp
index f86db78..727d202 100644
--- a/noncore/settings/sound/soundsettingsbase.cpp
+++ b/noncore/settings/sound/soundsettingsbase.cpp
@@ -14,4 +14,5 @@
#include <qmainwindow.h>
+#include <qpe/qpeapplication.h>
#include <qlabel.h>
#include <qpushbutton.h>
@@ -85,4 +86,5 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
resize( 255, 301 );
setCaption( tr( "Vmemo Settings" ) );
+
SoundSettingsBaseLayout = new QGridLayout( this );
SoundSettingsBaseLayout->setSpacing( 6 );
@@ -252,3 +254,2 @@ SoundSettingsBase::~SoundSettingsBase()
// no need to delete child widgets, Qt does it all for us
}
-
diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h
index e65c813..7a939ea 100644
--- a/noncore/settings/sound/soundsettingsbase.h
+++ b/noncore/settings/sound/soundsettingsbase.h
@@ -12,4 +12,6 @@
#include <qvariant.h>
#include <qdialog.h>
+#include <qmainwindow.h>
+
class QVBoxLayout;
class QHBoxLayout;
@@ -21,5 +23,5 @@ class QLabel;
class QSlider;
-class SoundSettingsBase : public QDialog
+class SoundSettingsBase : public QMainWindow
{
Q_OBJECT
@@ -46,6 +48,4 @@ public:
QLabel* TextLabel1;
QComboBox* LocationComboBox;
-/* QCheckBox* touchsound; */
-/* QCheckBox* keysound; */
protected:
@@ -59,4 +59,6 @@ protected:
QVBoxLayout* Layout12_2;
QVBoxLayout* Layout11;
+protected slots:
+
};