summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-05-23 18:57:58 (UTC)
committer llornkcor <llornkcor>2002-05-23 18:57:58 (UTC)
commit343f008ab9a6905ff6f9c953279e84cc581ea8b6 (patch) (unidiff)
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
@@ -20,6 +20,7 @@
20 20
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>
25#include <qpe/storage.h> 26#include <qpe/storage.h>
@@ -41,6 +42,7 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
41// touchsound->setChecked(config.readBoolEntry("TouchSound")); 42// touchsound->setChecked(config.readBoolEntry("TouchSound"));
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
46 cfg.setGroup("Record"); 48 cfg.setGroup("Record");
@@ -68,55 +70,56 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
68// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 70// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
69} 71}
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
121void SoundSettings::setVolume(int v) 124void SoundSettings::setVolume(int v)
122{ 125{
@@ -175,3 +178,23 @@ void SoundSettings::setLocation(const QString & string) {
175 config.writeEntry("RecLocation",string); 178 config.writeEntry("RecLocation",string);
176 179
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
@@ -32,13 +32,13 @@ public:
32 SoundSettings( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 32 SoundSettings( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
33 33
34protected: 34protected:
35 void accept(); 35/* void accept(); */
36 void reject(); 36/* void reject(); */
37 void updateStorageCombo(); 37 void updateStorageCombo();
38 38
39private slots: 39private 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);
44 44
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
@@ -13,6 +13,7 @@
13#include <qgroupbox.h> 13#include <qgroupbox.h>
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>
18#include <qslider.h> 19#include <qslider.h>
@@ -84,6 +85,7 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
84 setName( "SoundSettingsBase" ); 85 setName( "SoundSettingsBase" );
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 );
89 SoundSettingsBaseLayout->setMargin( 11 ); 91 SoundSettingsBaseLayout->setMargin( 11 );
@@ -251,4 +253,3 @@ SoundSettingsBase::~SoundSettingsBase()
251{ 253{
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
@@ -11,6 +11,8 @@
11 11
12#include <qvariant.h> 12#include <qvariant.h>
13#include <qdialog.h> 13#include <qdialog.h>
14#include <qmainwindow.h>
15
14class QVBoxLayout; 16class QVBoxLayout;
15class QHBoxLayout; 17class QHBoxLayout;
16class QGridLayout; 18class QGridLayout;
@@ -20,7 +22,7 @@ class QGroupBox;
20class QLabel; 22class QLabel;
21class QSlider; 23class QSlider;
22 24
23class SoundSettingsBase : public QDialog 25class SoundSettingsBase : public QMainWindow
24{ 26{
25 Q_OBJECT 27 Q_OBJECT
26 28
@@ -45,8 +47,6 @@ public:
45 QCheckBox* AlertCheckBox; 47 QCheckBox* AlertCheckBox;
46 QLabel* TextLabel1; 48 QLabel* TextLabel1;
47 QComboBox* LocationComboBox; 49 QComboBox* LocationComboBox;
48/* QCheckBox* touchsound; */
49/* QCheckBox* keysound; */
50 50
51protected: 51protected:
52 QGridLayout* SoundSettingsBaseLayout; 52 QGridLayout* SoundSettingsBaseLayout;
@@ -58,6 +58,8 @@ protected:
58 QHBoxLayout* Layout17; 58 QHBoxLayout* Layout17;
59 QVBoxLayout* Layout12_2; 59 QVBoxLayout* Layout12_2;
60 QVBoxLayout* Layout11; 60 QVBoxLayout* Layout11;
61protected slots:
62
61}; 63};
62 64
63#endif // SOUNDSETTINGSBASE_H 65#endif // SOUNDSETTINGSBASE_H