summaryrefslogtreecommitdiff
path: root/noncore/settings/sound
authorllornkcor <llornkcor>2002-05-23 18:57:58 (UTC)
committer llornkcor <llornkcor>2002-05-23 18:57:58 (UTC)
commit343f008ab9a6905ff6f9c953279e84cc581ea8b6 (patch) (unidiff)
tree8372d7ca528d4895ae5b73100036f5a0a06170d6 /noncore/settings/sound
parent80acaa41e768bf4492dacdaf0a2cf19dff89b500 (diff)
downloadopie-343f008ab9a6905ff6f9c953279e84cc581ea8b6.zip
opie-343f008ab9a6905ff6f9c953279e84cc581ea8b6.tar.gz
opie-343f008ab9a6905ff6f9c953279e84cc581ea8b6.tar.bz2
removed silly functions that arent called
Diffstat (limited to 'noncore/settings/sound') (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
@@ -22,2 +22,3 @@
22 22
23#include <qpe/qpeapplication.h>
23#include <qpe/config.h> 24#include <qpe/config.h>
@@ -43,2 +44,3 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
43 Config cfg("Vmemo"); 44 Config cfg("Vmemo");
45 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
44 AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); 46 AlertCheckBox->setChecked(cfg.readBoolEntry("Alert"));
@@ -70,51 +72,52 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
70 72
71void SoundSettings::reject() 73// void SoundSettings::reject()
72{ 74// {
73 qDebug("here"); 75// qDebug("reject");
74 Config config( "qpe"); 76// Config config( "qpe");
75 config.setGroup( "Volume"); 77// config.setGroup( "Volume");
76 78
77 setVolume(100-config.readNumEntry("VolumePercent")); 79// setVolume(100-config.readNumEntry("VolumePercent"));
78 setMic(100-config.readNumEntry("Mic")); 80// setMic(100-config.readNumEntry("Mic"));
79 81
80// config.setGroup("Record"); 82// // config.setGroup("Record");
81// int rate=config.readNumEntry("SampleRate", 11025); 83// // int rate=config.readNumEntry("SampleRate", 11025);
82// if(rate == 11025) 84// // if(rate == 11025)
83// sampleRate->setCurrentItem(0); 85// // sampleRate->setCurrentItem(0);
84// else if(rate == 22050) 86// // else if(rate == 22050)
85// sampleRate->setCurrentItem(1); 87// // sampleRate->setCurrentItem(1);
86// else if(rate == 32000) 88// // else if(rate == 32000)
87// sampleRate->setCurrentItem(2); 89// // sampleRate->setCurrentItem(2);
88// else if(rate==44100) 90// // else if(rate==44100)
89// sampleRate->setCurrentItem(3); 91// // sampleRate->setCurrentItem(3);
90// stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0)); 92// // stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0));
91// sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0)); 93// // sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0));
92 ::exit(-1); 94// qDebug("QDialog::reject();");
93// QDialog::reject(); 95// ::exit(-1);
94} 96// }
95 97
96void SoundSettings::accept() 98// void SoundSettings::accept()
97{ 99// {
98 Config config( "qpe" ); 100// qDebug("accept");
99 config.setGroup( "Volume" ); 101// Config config( "qpe" );
100 config.writeEntry("VolumePercent",100-volume->value()); 102// config.setGroup( "Volume" );
101 config.writeEntry("Mic",100-mic->value()); 103// config.writeEntry("VolumePercent",100-volume->value());
102// config.writeEntry("TouchSound",touchsound->isChecked()); 104// config.writeEntry("Mic",100-mic->value());
103// config.writeEntry("KeySound",keysound->isChecked()); 105// // config.writeEntry("TouchSound",touchsound->isChecked());
104 106// // config.writeEntry("KeySound",keysound->isChecked());
105 Config cfg("Vmemo"); 107
106 cfg.writeEntry("Alert",AlertCheckBox->isChecked()); 108// Config cfg("Vmemo");
107 setVolume(volume->value()); 109// cfg.writeEntry("Alert",AlertCheckBox->isChecked());
108 setMic(mic->value()); 110// setVolume(volume->value());
109 111// setMic(mic->value());
110 cfg.setGroup("Record"); 112
111 cfg.writeEntry("SampleRate",sampleRate->currentText()); 113// cfg.setGroup("Record");
112 cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); 114// cfg.writeEntry("SampleRate",sampleRate->currentText());
113 cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); 115// cfg.writeEntry("Stereo",stereoCheckBox->isChecked());
114// Config cfg( "VMemo" ); 116// cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
115// cfg.setGroup( "Defaults" ); 117// // Config cfg( "VMemo" );
116// cfg.writeEntry( "hideIcon", HideIcon_CheckBox->isChecked()); 118// // cfg.setGroup( "Defaults" );
117// QDialog::accept(); 119// // cfg.writeEntry( "hideIcon", HideIcon_CheckBox->isChecked());
118 ::exit(0); 120// qDebug("QDialog::accept();");
119} 121// ::exit(0);
122// }
120 123
@@ -177 +180,21 @@ void SoundSettings::setLocation(const QString & string) {
177} 180}
181
182void SoundSettings::cleanUp() {
183 qDebug("cleanup");
184 Config config( "qpe" );
185 config.setGroup( "Volume" );
186 config.writeEntry("VolumePercent",100-volume->value());
187 config.writeEntry("Mic",100-mic->value());
188// config.writeEntry("TouchSound",touchsound->isChecked());
189// config.writeEntry("KeySound",keysound->isChecked());
190
191 Config cfg("Vmemo");
192 cfg.writeEntry("Alert",AlertCheckBox->isChecked());
193 setVolume(volume->value());
194 setMic(mic->value());
195
196 cfg.setGroup("Record");
197 cfg.writeEntry("SampleRate",sampleRate->currentText());
198 cfg.writeEntry("Stereo",stereoCheckBox->isChecked());
199 cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
200}
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
@@ -34,4 +34,4 @@ public:
34protected: 34protected:
35 void accept(); 35/* void accept(); */
36 void reject(); 36/* void reject(); */
37 void updateStorageCombo(); 37 void updateStorageCombo();
@@ -40,3 +40,3 @@ private slots:
40 void setLocation(const QString &); 40 void setLocation(const QString &);
41 41 void cleanUp();
42 void setVolume(int); 42 void setVolume(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
@@ -15,2 +15,3 @@
15 15
16#include <qpe/qpeapplication.h>
16#include <qlabel.h> 17#include <qlabel.h>
@@ -86,2 +87,3 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
86 setCaption( tr( "Vmemo Settings" ) ); 87 setCaption( tr( "Vmemo Settings" ) );
88
87 SoundSettingsBaseLayout = new QGridLayout( this ); 89 SoundSettingsBaseLayout = new QGridLayout( this );
@@ -253,2 +255 @@ SoundSettingsBase::~SoundSettingsBase()
253} }
254
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
@@ -13,2 +13,4 @@
13#include <qdialog.h> 13#include <qdialog.h>
14#include <qmainwindow.h>
15
14class QVBoxLayout; 16class QVBoxLayout;
@@ -22,3 +24,3 @@ class QSlider;
22 24
23class SoundSettingsBase : public QDialog 25class SoundSettingsBase : public QMainWindow
24{ 26{
@@ -47,4 +49,2 @@ public:
47 QComboBox* LocationComboBox; 49 QComboBox* LocationComboBox;
48/* QCheckBox* touchsound; */
49/* QCheckBox* keysound; */
50 50
@@ -60,2 +60,4 @@ protected:
60 QVBoxLayout* Layout11; 60 QVBoxLayout* Layout11;
61protected slots:
62
61}; 63};