author | llornkcor <llornkcor> | 2002-05-23 18:57:58 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-05-23 18:57:58 (UTC) |
commit | 343f008ab9a6905ff6f9c953279e84cc581ea8b6 (patch) (unidiff) | |
tree | 8372d7ca528d4895ae5b73100036f5a0a06170d6 | |
parent | 80acaa41e768bf4492dacdaf0a2cf19dff89b500 (diff) | |
download | opie-343f008ab9a6905ff6f9c953279e84cc581ea8b6.zip opie-343f008ab9a6905ff6f9c953279e84cc581ea8b6.tar.gz opie-343f008ab9a6905ff6f9c953279e84cc581ea8b6.tar.bz2 |
removed silly functions that arent called
-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 121 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettings.h | 6 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.cpp | 3 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.h | 8 |
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 @@ | |||
21 | #include "soundsettings.h" | 21 | #include "soundsettings.h" |
22 | 22 | ||
23 | #include <qpe/qpeapplication.h> | ||
23 | #include <qpe/config.h> | 24 | #include <qpe/config.h> |
24 | #include <qpe/qcopenvelope_qws.h> | 25 | #include <qpe/qcopenvelope_qws.h> |
@@ -42,4 +43,5 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl ) | |||
42 | // keysound->setChecked(config.readBoolEntry("KeySound")); | 43 | // keysound->setChecked(config.readBoolEntry("KeySound")); |
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")); |
45 | 47 | ||
@@ -69,53 +71,54 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl ) | |||
69 | } | 71 | } |
70 | 72 | ||
71 | void 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 | ||
96 | void 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 | ||
121 | void SoundSettings::setVolume(int v) | 124 | void SoundSettings::setVolume(int v) |
@@ -176,2 +179,22 @@ void SoundSettings::setLocation(const QString & string) { | |||
176 | 179 | ||
177 | } | 180 | } |
181 | |||
182 | void 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 | |||
@@ -33,11 +33,11 @@ public: | |||
33 | 33 | ||
34 | protected: | 34 | protected: |
35 | void accept(); | 35 | /* void accept(); */ |
36 | void reject(); | 36 | /* void reject(); */ |
37 | void updateStorageCombo(); | 37 | void updateStorageCombo(); |
38 | 38 | ||
39 | private slots: | 39 | private slots: |
40 | void setLocation(const QString &); | 40 | void setLocation(const QString &); |
41 | 41 | void cleanUp(); | |
42 | void setVolume(int); | 42 | void setVolume(int); |
43 | void setMic(int); | 43 | 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 @@ | |||
14 | #include <qmainwindow.h> | 14 | #include <qmainwindow.h> |
15 | 15 | ||
16 | #include <qpe/qpeapplication.h> | ||
16 | #include <qlabel.h> | 17 | #include <qlabel.h> |
17 | #include <qpushbutton.h> | 18 | #include <qpushbutton.h> |
@@ -85,4 +86,5 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m | |||
85 | resize( 255, 301 ); | 86 | resize( 255, 301 ); |
86 | setCaption( tr( "Vmemo Settings" ) ); | 87 | setCaption( tr( "Vmemo Settings" ) ); |
88 | |||
87 | SoundSettingsBaseLayout = new QGridLayout( this ); | 89 | SoundSettingsBaseLayout = new QGridLayout( this ); |
88 | SoundSettingsBaseLayout->setSpacing( 6 ); | 90 | SoundSettingsBaseLayout->setSpacing( 6 ); |
@@ -252,3 +254,2 @@ SoundSettingsBase::~SoundSettingsBase() | |||
252 | // no need to delete child widgets, Qt does it all for us | 254 | // no need to delete child widgets, Qt does it all for us |
253 | } | 255 | } |
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 | |||
@@ -12,4 +12,6 @@ | |||
12 | #include <qvariant.h> | 12 | #include <qvariant.h> |
13 | #include <qdialog.h> | 13 | #include <qdialog.h> |
14 | #include <qmainwindow.h> | ||
15 | |||
14 | class QVBoxLayout; | 16 | class QVBoxLayout; |
15 | class QHBoxLayout; | 17 | class QHBoxLayout; |
@@ -21,5 +23,5 @@ class QLabel; | |||
21 | class QSlider; | 23 | class QSlider; |
22 | 24 | ||
23 | class SoundSettingsBase : public QDialog | 25 | class SoundSettingsBase : public QMainWindow |
24 | { | 26 | { |
25 | Q_OBJECT | 27 | Q_OBJECT |
@@ -46,6 +48,4 @@ public: | |||
46 | QLabel* TextLabel1; | 48 | QLabel* TextLabel1; |
47 | QComboBox* LocationComboBox; | 49 | QComboBox* LocationComboBox; |
48 | /* QCheckBox* touchsound; */ | ||
49 | /* QCheckBox* keysound; */ | ||
50 | 50 | ||
51 | protected: | 51 | protected: |
@@ -59,4 +59,6 @@ protected: | |||
59 | QVBoxLayout* Layout12_2; | 59 | QVBoxLayout* Layout12_2; |
60 | QVBoxLayout* Layout11; | 60 | QVBoxLayout* Layout11; |
61 | protected slots: | ||
62 | |||
61 | }; | 63 | }; |
62 | 64 | ||