-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 107 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettings.h | 5 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.cpp | 201 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.h | 23 |
4 files changed, 53 insertions, 283 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index a163d38..99fccf7 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp | |||
@@ -1,293 +1,186 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "soundsettings.h" | 21 | #include "soundsettings.h" |
22 | 22 | ||
23 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
24 | #include <qpe/config.h> | 24 | #include <qpe/config.h> |
25 | #include <qpe/qcopenvelope_qws.h> | 25 | #include <qpe/qcopenvelope_qws.h> |
26 | #include <qpe/storage.h> | 26 | #include <qpe/storage.h> |
27 | 27 | ||
28 | #include <qapplication.h> | 28 | #include <qapplication.h> |
29 | #include <qslider.h> | 29 | #include <qslider.h> |
30 | #include <qcheckbox.h> | 30 | #include <qcheckbox.h> |
31 | #include <qlineedit.h> | 31 | #include <qlineedit.h> |
32 | #include <qcombobox.h> | 32 | #include <qcombobox.h> |
33 | 33 | ||
34 | #include <sys/utsname.h> | 34 | #include <sys/utsname.h> |
35 | #include <sys/time.h> | 35 | #include <sys/time.h> |
36 | #include <sys/types.h> | 36 | #include <sys/types.h> |
37 | #include <unistd.h> | 37 | #include <unistd.h> |
38 | #include <stdio.h> | 38 | #include <stdio.h> |
39 | #include <sys/stat.h> | 39 | #include <sys/stat.h> |
40 | 40 | ||
41 | SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) | 41 | SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) |
42 | : SoundSettingsBase( parent, objname, TRUE, fl ) | 42 | : SoundSettingsBase( parent, objname, TRUE, fl ) |
43 | { | 43 | { |
44 | keyReset=FALSE; | 44 | keyReset=FALSE; |
45 | 45 | ||
46 | Config config( "qpe"); | 46 | Config config( "qpe"); |
47 | config.setGroup( "Volume" ); | 47 | config.setGroup( "Volume" ); |
48 | volume->setValue(100-config.readNumEntry("VolumePercent")); | ||
49 | mic->setValue(100-config.readNumEntry("Mic")); | ||
50 | // touchsound->setChecked(config.readBoolEntry("TouchSound")); | ||
51 | // keysound->setChecked(config.readBoolEntry("KeySound")); | ||
52 | Config cfg("Vmemo"); | 48 | Config cfg("Vmemo"); |
53 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 49 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
54 | AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); | 50 | AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); |
55 | 51 | ||
56 | cfg.setGroup("Record"); | 52 | cfg.setGroup("Record"); |
57 | int rate=config.readNumEntry("SampleRate", 22050); | 53 | int rate=config.readNumEntry("SampleRate", 22050); |
58 | if(rate == 8000) | 54 | if(rate == 8000) |
59 | sampleRate->setCurrentItem(0); | 55 | sampleRate->setCurrentItem(0); |
60 | else if(rate == 11025) | 56 | else if(rate == 11025) |
61 | sampleRate->setCurrentItem(1); | 57 | sampleRate->setCurrentItem(1); |
62 | else if(rate == 22050) | 58 | else if(rate == 22050) |
63 | sampleRate->setCurrentItem(2); | 59 | sampleRate->setCurrentItem(2); |
64 | else if(rate == 33075) | 60 | else if(rate == 33075) |
65 | sampleRate->setCurrentItem(3); | 61 | sampleRate->setCurrentItem(3); |
66 | else if(rate==44100) | 62 | else if(rate==44100) |
67 | sampleRate->setCurrentItem(4); | 63 | sampleRate->setCurrentItem(4); |
68 | 64 | ||
69 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only | 65 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only |
70 | 66 | ||
71 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) //since ipaq and zaurus have particular | 67 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) //since ipaq and zaurus have particular |
72 | //devices | 68 | //devices |
73 | bool systemZaurus=FALSE; | 69 | bool systemZaurus=FALSE; |
74 | struct utsname name; /* check for embedix kernel running on the zaurus*/ | 70 | struct utsname name; /* check for embedix kernel running on the zaurus*/ |
75 | if (uname(&name) != -1) {// TODO change this here,... | 71 | if (uname(&name) != -1) {// TODO change this here,... |
76 | QString release=name.release; | 72 | QString release=name.release; |
77 | if( release.find("embedix",0,TRUE) != -1) { | 73 | if( release.find("embedix",0,TRUE) != -1) { |
78 | qDebug("IS System Zaurus"); | 74 | qDebug("IS System Zaurus"); |
79 | systemZaurus=TRUE; | 75 | systemZaurus=TRUE; |
80 | } | 76 | } |
81 | } | 77 | } |
82 | if(!systemZaurus) { | 78 | if(!systemZaurus) { |
83 | stereoCheckBox->setChecked(TRUE); | 79 | stereoCheckBox->setChecked(TRUE); |
84 | } | 80 | } |
85 | stereoCheckBox->setEnabled(FALSE); | 81 | stereoCheckBox->setEnabled(FALSE); |
86 | sixteenBitCheckBox->setEnabled(FALSE); | 82 | sixteenBitCheckBox->setEnabled(FALSE); |
87 | #else | 83 | #else |
88 | #endif | 84 | #endif |
89 | int sRate=cfg.readNumEntry("SizeLimit", 30); | 85 | int sRate=cfg.readNumEntry("SizeLimit", 30); |
90 | qDebug("%d",sRate); | 86 | qDebug("%d",sRate); |
91 | 87 | ||
92 | if(sRate ==30) | 88 | if(sRate ==30) |
93 | timeLimitComboBox->setCurrentItem(0); | 89 | timeLimitComboBox->setCurrentItem(0); |
94 | else if(sRate==20) | 90 | else if(sRate==20) |
95 | timeLimitComboBox->setCurrentItem(1); | 91 | timeLimitComboBox->setCurrentItem(1); |
96 | else if(sRate == 15) | 92 | else if(sRate == 15) |
97 | timeLimitComboBox->setCurrentItem(2); | 93 | timeLimitComboBox->setCurrentItem(2); |
98 | else if(sRate == 10) | 94 | else if(sRate == 10) |
99 | timeLimitComboBox->setCurrentItem(3); | 95 | timeLimitComboBox->setCurrentItem(3); |
100 | else | 96 | else |
101 | timeLimitComboBox->setCurrentItem(4); | 97 | timeLimitComboBox->setCurrentItem(4); |
102 | 98 | ||
103 | |||
104 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); | 99 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); |
105 | 100 | ||
106 | cfg.setGroup("Defaults"); | 101 | cfg.setGroup("Defaults"); |
107 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); | 102 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); |
108 | 103 | ||
109 | updateStorageCombo(); | 104 | updateStorageCombo(); |
110 | |||
111 | connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); | ||
112 | connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int))); | ||
113 | connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) ); | ||
114 | connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) ); | ||
115 | |||
116 | connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); | 105 | connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); |
117 | connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT( setKeyButton(const QString &))); | 106 | connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT( setKeyButton(const QString &))); |
118 | connect( timeLimitComboBox,SIGNAL(activated( const QString &)),this,SLOT( setSizeLimitButton(const QString &))); | 107 | connect( timeLimitComboBox,SIGNAL(activated( const QString &)),this,SLOT( setSizeLimitButton(const QString &))); |
119 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 108 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
120 | } | 109 | } |
121 | |||
122 | // void SoundSettings::reject() | ||
123 | // { | ||
124 | // qDebug("reject"); | ||
125 | // Config config( "qpe"); | ||
126 | // config.setGroup( "Volume"); | ||
127 | |||
128 | // setVolume(100-config.readNumEntry("VolumePercent")); | ||
129 | // setMic(100-config.readNumEntry("Mic")); | ||
130 | |||
131 | // // config.setGroup("Record"); | ||
132 | // // int rate=config.readNumEntry("SampleRate", 11025); | ||
133 | // // if(rate == 11025) | ||
134 | // // sampleRate->setCurrentItem(0); | ||
135 | // // else if(rate == 22050) | ||
136 | // // sampleRate->setCurrentItem(1); | ||
137 | // // else if(rate == 32000) | ||
138 | // // sampleRate->setCurrentItem(2); | ||
139 | // // else if(rate==44100) | ||
140 | // // sampleRate->setCurrentItem(3); | ||
141 | // // stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0)); | ||
142 | // // sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0)); | ||
143 | // qDebug("QDialog::reject();"); | ||
144 | // ::exit(-1); | ||
145 | // } | ||
146 | |||
147 | // void SoundSettings::accept() | ||
148 | // { | ||
149 | // qDebug("accept"); | ||
150 | // Config config( "qpe" ); | ||
151 | // config.setGroup( "Volume" ); | ||
152 | // config.writeEntry("VolumePercent",100-volume->value()); | ||
153 | // config.writeEntry("Mic",100-mic->value()); | ||
154 | // // config.writeEntry("TouchSound",touchsound->isChecked()); | ||
155 | // // config.writeEntry("KeySound",keysound->isChecked()); | ||
156 | |||
157 | // Config cfg("Vmemo"); | ||
158 | // cfg.writeEntry("Alert",AlertCheckBox->isChecked()); | ||
159 | // setVolume(volume->value()); | ||
160 | // setMic(mic->value()); | ||
161 | |||
162 | // cfg.setGroup("Record"); | ||
163 | // cfg.writeEntry("SampleRate",sampleRate->currentText()); | ||
164 | // cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); | ||
165 | // cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); | ||
166 | // // Config cfg( "VMemo" ); | ||
167 | // // cfg.setGroup( "Defaults" ); | ||
168 | // // cfg.writeEntry( "hideIcon", HideIcon_CheckBox->isChecked()); | ||
169 | // qDebug("QDialog::accept();"); | ||
170 | // ::exit(0); | ||
171 | // } | ||
172 | |||
173 | void SoundSettings::setVolume(int v) | ||
174 | { | ||
175 | Config config( "qpe" ); | ||
176 | config.setGroup( "Volume" ); | ||
177 | config.writeEntry("VolumePercent",100-v); | ||
178 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) | ||
179 | QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE; | ||
180 | #endif | ||
181 | } | ||
182 | |||
183 | void SoundSettings::setMic(int m) | ||
184 | { | ||
185 | Config config( "qpe" ); | ||
186 | config.setGroup( "Volume" ); | ||
187 | config.writeEntry("Mic",100-m); | ||
188 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) | ||
189 | QCopEnvelope( "QPE/System", "micChange(bool)" ) << FALSE; | ||
190 | #endif | ||
191 | } | ||
192 | |||
193 | void SoundSettings::volumeChanged( bool ) | ||
194 | { | ||
195 | Config config( "qpe" ); | ||
196 | config.setGroup( "Volume" ); | ||
197 | volume->setValue(100-config.readNumEntry("VolumePercent")); | ||
198 | } | ||
199 | |||
200 | void SoundSettings::micChanged( bool ) | ||
201 | { | ||
202 | Config config( "qpe" ); | ||
203 | config.setGroup( "Volume" ); | ||
204 | mic->setValue(100-config.readNumEntry("Mic")); | ||
205 | } | ||
206 | |||
207 | void SoundSettings::updateStorageCombo() { | 110 | void SoundSettings::updateStorageCombo() { |
208 | 111 | ||
209 | Config config( "Vmemo" ); | 112 | Config config( "Vmemo" ); |
210 | config.setGroup( "System" ); | 113 | config.setGroup( "System" ); |
211 | QString loc = config.readEntry("RecLocation","/"); | 114 | QString loc = config.readEntry("RecLocation","/"); |
212 | int i=0; | 115 | int i=0; |
213 | int set=0; | 116 | int set=0; |
214 | StorageInfo storageInfo; | 117 | StorageInfo storageInfo; |
215 | QString sName, sPath; | 118 | QString sName, sPath; |
216 | QStringList list; | 119 | QStringList list; |
217 | list << "Documents : "+QPEApplication::documentDir(); | 120 | list << "Documents : "+QPEApplication::documentDir(); |
218 | list << "tmp : /tmp"; | 121 | list << "tmp : /tmp"; |
219 | 122 | ||
220 | const QList<FileSystem> &fs = storageInfo.fileSystems(); | 123 | const QList<FileSystem> &fs = storageInfo.fileSystems(); |
221 | QListIterator<FileSystem> it ( fs ); | 124 | QListIterator<FileSystem> it ( fs ); |
222 | for( ; it.current(); ++it ){ | 125 | for( ; it.current(); ++it ){ |
223 | const QString name = (*it)->name(); | 126 | const QString name = (*it)->name(); |
224 | const QString path = (*it)->path(); | 127 | const QString path = (*it)->path(); |
225 | qDebug("storage name "+name +" storage path is "+path); | 128 | qDebug("storage name "+name +" storage path is "+path); |
226 | list << name + ": " +path; | 129 | list << name + ": " +path; |
227 | if( loc.find( path,0,TRUE) != -1) | 130 | if( loc.find( path,0,TRUE) != -1) |
228 | set = i; | 131 | set = i; |
229 | // if(dit.current()->file().find(path) != -1 ) storage=name; | 132 | // if(dit.current()->file().find(path) != -1 ) storage=name; |
230 | i++; | 133 | i++; |
231 | } | 134 | } |
232 | 135 | ||
233 | LocationComboBox->insertStringList(list); | 136 | LocationComboBox->insertStringList(list); |
234 | qDebug("set item %d", set); | 137 | qDebug("set item %d", set); |
235 | LocationComboBox->setCurrentItem(set); | 138 | LocationComboBox->setCurrentItem(set); |
236 | } | 139 | } |
237 | 140 | ||
238 | void SoundSettings::setLocation(const QString & string) { | 141 | void SoundSettings::setLocation(const QString & string) { |
239 | Config config( "Vmemo" ); | 142 | Config config( "Vmemo" ); |
240 | config.setGroup( "System" ); | 143 | config.setGroup( "System" ); |
241 | config.writeEntry("RecLocation",string); | 144 | config.writeEntry("RecLocation",string); |
242 | qDebug("set location "+string); | 145 | qDebug("set location "+string); |
243 | config.write(); | 146 | config.write(); |
244 | } | 147 | } |
245 | 148 | ||
246 | void SoundSettings::cleanUp() { | 149 | void SoundSettings::cleanUp() { |
247 | qDebug("cleanup"); | ||
248 | Config config( "qpe" ); | ||
249 | config.setGroup( "Volume" ); | ||
250 | config.writeEntry("VolumePercent",100-volume->value()); | ||
251 | config.writeEntry("Mic",100-mic->value()); | ||
252 | // config.writeEntry("TouchSound",touchsound->isChecked()); | ||
253 | // config.writeEntry("KeySound",keysound->isChecked()); | ||
254 | |||
255 | Config cfg("Vmemo"); | 150 | Config cfg("Vmemo"); |
256 | cfg.writeEntry("Alert",AlertCheckBox->isChecked()); | 151 | cfg.writeEntry("Alert",AlertCheckBox->isChecked()); |
257 | setVolume(volume->value()); | ||
258 | setMic(mic->value()); | ||
259 | 152 | ||
260 | cfg.setGroup("Record"); | 153 | cfg.setGroup("Record"); |
261 | cfg.writeEntry("SampleRate",sampleRate->currentText()); | 154 | cfg.writeEntry("SampleRate",sampleRate->currentText()); |
262 | cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); | 155 | cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); |
263 | cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); | 156 | cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); |
264 | 157 | ||
265 | if(keyReset) QCopEnvelope ("QPE/System", "restart()"); | 158 | if(keyReset) QCopEnvelope ("QPE/System", "restart()"); |
266 | 159 | ||
267 | } | 160 | } |
268 | 161 | ||
269 | void SoundSettings::setKeyButton(const QString &name) { | 162 | void SoundSettings::setKeyButton(const QString &name) { |
270 | Config cfg("Vmemo"); | 163 | Config cfg("Vmemo"); |
271 | cfg.setGroup("Defaults"); | 164 | cfg.setGroup("Defaults"); |
272 | cfg.writeEntry( "toggleKey", keyComboBox->currentItem() ); | 165 | cfg.writeEntry( "toggleKey", keyComboBox->currentItem() ); |
273 | keyReset = TRUE; | 166 | keyReset = TRUE; |
274 | if(keyComboBox->currentItem() == 1) | 167 | if(keyComboBox->currentItem() == 1) |
275 | cfg.writeEntry( "hideIcon", 0 ); | 168 | cfg.writeEntry( "hideIcon", 0 ); |
276 | else | 169 | else |
277 | cfg.writeEntry( "hideIcon", 1); | 170 | cfg.writeEntry( "hideIcon", 1); |
278 | 171 | ||
279 | 172 | ||
280 | cfg.write(); | 173 | cfg.write(); |
281 | } | 174 | } |
282 | 175 | ||
283 | void SoundSettings::updateLocationCombo() { | 176 | void SoundSettings::updateLocationCombo() { |
284 | 177 | ||
285 | } | 178 | } |
286 | 179 | ||
287 | void SoundSettings::setSizeLimitButton(const QString &index) { | 180 | void SoundSettings::setSizeLimitButton(const QString &index) { |
288 | 181 | ||
289 | Config cfg("Vmemo"); | 182 | Config cfg("Vmemo"); |
290 | cfg.setGroup("Record"); | 183 | cfg.setGroup("Record"); |
291 | cfg.writeEntry("SizeLimit", index); | 184 | cfg.writeEntry("SizeLimit", index); |
292 | cfg.write(); | 185 | cfg.write(); |
293 | } | 186 | } |
diff --git a/noncore/settings/sound/soundsettings.h b/noncore/settings/sound/soundsettings.h index 94d5d48..6b8b835 100644 --- a/noncore/settings/sound/soundsettings.h +++ b/noncore/settings/sound/soundsettings.h | |||
@@ -1,54 +1,49 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef SOUNDSETTINGS_H | 20 | #ifndef SOUNDSETTINGS_H |
21 | #define SOUNDSETTINGS_H | 21 | #define SOUNDSETTINGS_H |
22 | 22 | ||
23 | 23 | ||
24 | #include "soundsettingsbase.h" | 24 | #include "soundsettingsbase.h" |
25 | 25 | ||
26 | 26 | ||
27 | class SoundSettings : public SoundSettingsBase | 27 | class SoundSettings : public SoundSettingsBase |
28 | { | 28 | { |
29 | Q_OBJECT | 29 | Q_OBJECT |
30 | 30 | ||
31 | public: | 31 | 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 | ||
34 | protected: | 34 | protected: |
35 | /* void accept(); */ | 35 | /* void accept(); */ |
36 | /* void reject(); */ | 36 | /* void reject(); */ |
37 | void updateStorageCombo(); | 37 | void updateStorageCombo(); |
38 | void updateLocationCombo(); | 38 | void updateLocationCombo(); |
39 | 39 | ||
40 | private slots: | 40 | private slots: |
41 | void setKeyButton(const QString &); | 41 | void setKeyButton(const QString &); |
42 | void setSizeLimitButton(const QString &); | 42 | void setSizeLimitButton(const QString &); |
43 | void setLocation(const QString &); | 43 | void setLocation(const QString &); |
44 | void cleanUp(); | 44 | void cleanUp(); |
45 | void setVolume(int); | ||
46 | void setMic(int); | ||
47 | |||
48 | void volumeChanged( bool muted ); | ||
49 | void micChanged( bool muted ); | ||
50 | }; | 45 | }; |
51 | 46 | ||
52 | 47 | ||
53 | #endif // SOUNDSETTINGS_H | 48 | #endif // SOUNDSETTINGS_H |
54 | 49 | ||
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp index 8be1b3d..4c28ae9 100644 --- a/noncore/settings/sound/soundsettingsbase.cpp +++ b/noncore/settings/sound/soundsettingsbase.cpp | |||
@@ -38,254 +38,145 @@ static const char* const image0_data[] = { | |||
38 | "aaaaaa.#.#..#.##", | 38 | "aaaaaa.#.#..#.##", |
39 | "aaaaaa.#.##.#.##", | 39 | "aaaaaa.#.##.#.##", |
40 | "aaaaaa.#.##.#.##", | 40 | "aaaaaa.#.##.#.##", |
41 | "aaaaaa.#.##.#.##", | 41 | "aaaaaa.#.##.#.##", |
42 | "aaaaaa.#.#..#.##", | 42 | "aaaaaa.#.#..#.##", |
43 | "...aaa...#.##.#.", | 43 | "...aaa...#.##.#.", |
44 | "....aa..#..#..#.", | 44 | "....aa..#..#..#.", |
45 | ".....a.....#.##.", | 45 | ".....a.....#.##.", |
46 | "..........#..#..", | 46 | "..........#..#..", |
47 | "............##.."}; | 47 | "............##.."}; |
48 | 48 | ||
49 | static const char* const image1_data[] = { | 49 | static const char* const image1_data[] = { |
50 | "16 16 3 1", | 50 | "16 16 3 1", |
51 | ". c None", | 51 | ". c None", |
52 | "# c #000000", | 52 | "# c #000000", |
53 | "a c #ff0000", | 53 | "a c #ff0000", |
54 | "................", | 54 | "................", |
55 | "................", | 55 | "................", |
56 | "................", | 56 | "................", |
57 | ".....#..........", | 57 | ".....#..........", |
58 | "....##..........", | 58 | "....##..........", |
59 | "...###...a...a..", | 59 | "...###...a...a..", |
60 | "######..aaa.aaa.", | 60 | "######..aaa.aaa.", |
61 | "######...aaaaa..", | 61 | "######...aaaaa..", |
62 | "######....aaa...", | 62 | "######....aaa...", |
63 | "######...aaaaa..", | 63 | "######...aaaaa..", |
64 | "######..aaa.aaa.", | 64 | "######..aaa.aaa.", |
65 | "...###...a...a..", | 65 | "...###...a...a..", |
66 | "....##..........", | 66 | "....##..........", |
67 | ".....#..........", | 67 | ".....#..........", |
68 | "................", | 68 | "................", |
69 | "................"}; | 69 | "................"}; |
70 | 70 | ||
71 | 71 | ||
72 | /* | 72 | /* |
73 | * Constructs a SoundSettingsBase which is a child of 'parent', with the | 73 | * Constructs a SoundSettingsBase which is a child of 'parent', with the |
74 | * name 'name' and widget flags set to 'f' | 74 | * name 'name' and widget flags set to 'f' |
75 | * | 75 | * |
76 | * The dialog will by default be modeless, unless you set 'modal' to | 76 | * The dialog will by default be modeless, unless you set 'modal' to |
77 | * TRUE to construct a modal dialog. | 77 | * TRUE to construct a modal dialog. |
78 | */ | 78 | */ |
79 | SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl ) | 79 | SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl ) |
80 | : QMainWindow( parent, name, fl ) | 80 | : QMainWindow( parent, name, fl ) |
81 | { | 81 | { |
82 | QPixmap image0( ( const char** ) image0_data ); | 82 | QPixmap image0( ( const char** ) image0_data ); |
83 | QPixmap image1( ( const char** ) image1_data ); | 83 | QPixmap image1( ( const char** ) image1_data ); |
84 | if ( !name ) | 84 | if ( !name ) |
85 | setName( "SoundSettingsBase" ); | 85 | setName( "SoundSettingsBase" ); |
86 | resize( 255, 301 ); | ||
87 | setCaption( tr( "Vmemo Settings" ) ); | 86 | setCaption( tr( "Vmemo Settings" ) ); |
88 | 87 | ||
89 | SoundSettingsBaseLayout = new QGridLayout( this ); | 88 | SoundSettingsBaseLayout = new QGridLayout( this ); |
90 | SoundSettingsBaseLayout->setSpacing( 6 ); | 89 | SoundSettingsBaseLayout->setSpacing( 4 ); |
91 | SoundSettingsBaseLayout->setMargin( 11 ); | 90 | SoundSettingsBaseLayout->setMargin( 6 ); |
92 | 91 | ||
93 | GroupBox3 = new QGroupBox( this, "GroupBox3" ); | 92 | stereoCheckBox = new QCheckBox( this, "stereoCheckBox" ); |
94 | GroupBox3->setFrameShape( QGroupBox::Box ); | 93 | stereoCheckBox->setText( tr( "Stereo" ) ); |
95 | GroupBox3->setFrameShadow( QGroupBox::Sunken ); | 94 | SoundSettingsBaseLayout->addMultiCellWidget(stereoCheckBox , 0, 0, 0, 0 ); |
96 | GroupBox3->setTitle( tr( "Levels" ) ); | ||
97 | GroupBox3->setColumnLayout(0, Qt::Vertical ); | ||
98 | GroupBox3->layout()->setSpacing( 0 ); | ||
99 | GroupBox3->layout()->setMargin( 0 ); | ||
100 | GroupBox3Layout = new QVBoxLayout( GroupBox3->layout() ); | ||
101 | GroupBox3Layout->setAlignment( Qt::AlignTop ); | ||
102 | GroupBox3Layout->setSpacing( 2 ); | ||
103 | GroupBox3Layout->setMargin( 2 ); | ||
104 | |||
105 | Layout10 = new QVBoxLayout; | ||
106 | Layout10->setSpacing( 2 ); | ||
107 | Layout10->setMargin( 2 ); | ||
108 | |||
109 | Layout16 = new QHBoxLayout; | ||
110 | Layout16->setSpacing( 2 ); | ||
111 | Layout16->setMargin( 2 ); | ||
112 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); | ||
113 | Layout16->addItem( spacer ); | ||
114 | |||
115 | PixmapLabel1_2 = new QLabel( GroupBox3, "PixmapLabel1_2" ); | ||
116 | PixmapLabel1_2->setPixmap( image0 ); | ||
117 | PixmapLabel1_2->setScaledContents( FALSE ); | ||
118 | Layout16->addWidget( PixmapLabel1_2 ); | ||
119 | |||
120 | TextLabel1_2 = new QLabel( GroupBox3, "TextLabel1_2" ); | ||
121 | TextLabel1_2->setText( tr( "Loud" ) ); | ||
122 | Layout16->addWidget( TextLabel1_2 ); | ||
123 | QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); | ||
124 | Layout16->addItem( spacer_2 ); | ||
125 | Layout10->addLayout( Layout16 ); | ||
126 | |||
127 | Layout13 = new QHBoxLayout; | ||
128 | Layout13->setSpacing( 2 ); | ||
129 | Layout13->setMargin( 2 ); | ||
130 | |||
131 | volLabel = new QLabel( GroupBox3, "volLabel" ); | ||
132 | volLabel->setText( tr( "Output" ) ); | ||
133 | Layout13->addWidget( volLabel ); | ||
134 | QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); | ||
135 | Layout13->addItem( spacer_3 ); | ||
136 | |||
137 | micLabel = new QLabel( GroupBox3, "micLabel" ); | ||
138 | micLabel->setText( tr( "Mic" ) ); | ||
139 | Layout13->addWidget( micLabel ); | ||
140 | QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); | ||
141 | Layout13->addItem( spacer_4 ); | ||
142 | Layout10->addLayout( Layout13 ); | ||
143 | |||
144 | Layout12 = new QHBoxLayout; | ||
145 | Layout12->setSpacing( 2 ); | ||
146 | Layout12->setMargin( 2 ); | ||
147 | |||
148 | volume = new QSlider( GroupBox3, "volume" ); | ||
149 | volume->setMaxValue( 100 ); | ||
150 | volume->setValue( 50 ); | ||
151 | volume->setOrientation( QSlider::Vertical ); | ||
152 | volume->setTickmarks( QSlider::Right ); | ||
153 | volume->setTickInterval( 5 ); | ||
154 | Layout12->addWidget( volume ); | ||
155 | QSpacerItem* spacer_5 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); | ||
156 | Layout12->addItem( spacer_5 ); | ||
157 | |||
158 | mic = new QSlider( GroupBox3, "mic" ); | ||
159 | mic->setMaxValue( 100 ); | ||
160 | mic->setValue( 50 ); | ||
161 | mic->setOrientation( QSlider::Vertical ); | ||
162 | mic->setTickmarks( QSlider::Right ); | ||
163 | mic->setTickInterval( 5 ); | ||
164 | Layout12->addWidget( mic ); | ||
165 | QSpacerItem* spacer_6 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); | ||
166 | Layout12->addItem( spacer_6 ); | ||
167 | Layout10->addLayout( Layout12 ); | ||
168 | |||
169 | Layout17 = new QHBoxLayout; | ||
170 | Layout17->setSpacing( 2 ); | ||
171 | Layout17->setMargin( 2 ); | ||
172 | QSpacerItem* spacer_7 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); | ||
173 | Layout17->addItem( spacer_7 ); | ||
174 | |||
175 | PixmapLabel2_2 = new QLabel( GroupBox3, "PixmapLabel2_2" ); | ||
176 | PixmapLabel2_2->setPixmap( image1 ); | ||
177 | PixmapLabel2_2->setScaledContents( FALSE ); | ||
178 | Layout17->addWidget( PixmapLabel2_2 ); | ||
179 | |||
180 | TextLabel2_2 = new QLabel( GroupBox3, "TextLabel2_2" ); | ||
181 | TextLabel2_2->setText( tr( "Silent" ) ); | ||
182 | Layout17->addWidget( TextLabel2_2 ); | ||
183 | QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); | ||
184 | Layout17->addItem( spacer_8 ); | ||
185 | Layout10->addLayout( Layout17 ); | ||
186 | GroupBox3Layout->addLayout( Layout10 ); | ||
187 | |||
188 | SoundSettingsBaseLayout->addWidget( GroupBox3, 0, 0 ); | ||
189 | |||
190 | Layout12_2 = new QVBoxLayout; | ||
191 | Layout12_2->setSpacing( 2 ); | ||
192 | Layout12_2->setMargin( 2 ); | ||
193 | |||
194 | GroupBox1 = new QGroupBox( this, "GroupBox1" ); | ||
195 | GroupBox1->setTitle( tr( "Vmemo" ) ); | ||
196 | 95 | ||
197 | QWidget* privateLayoutWidget = new QWidget( GroupBox1, "Layout11" ); | 96 | sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" ); |
198 | privateLayoutWidget->setGeometry( QRect( 5, 16, 96, 230 ) ); | 97 | sixteenBitCheckBox->setText( tr( "16 bit" ) ); |
98 | SoundSettingsBaseLayout->addMultiCellWidget( sixteenBitCheckBox , 0, 0, 1, 1 ); | ||
199 | 99 | ||
200 | Layout11 = new QVBoxLayout( privateLayoutWidget ); | 100 | AlertCheckBox = new QCheckBox( this, "AlertCheckBox" ); |
201 | Layout11->setSpacing( 2 ); | 101 | AlertCheckBox->setText( tr( "Visual Alerts" ) ); |
202 | Layout11->setMargin( 0 ); | 102 | SoundSettingsBaseLayout->addMultiCellWidget( AlertCheckBox , 0, 0, 2, 2 ); |
203 | 103 | ||
204 | sampleRateLabel = new QLabel( privateLayoutWidget, "sampleRateLabel" ); | 104 | QSpacerItem* spacer0 = new QSpacerItem( 20, 20,QSizePolicy::Expanding, QSizePolicy::Expanding ); |
205 | sampleRateLabel->setText( tr( "Sample Rate" ) ); | 105 | SoundSettingsBaseLayout->addItem( spacer0, 0, 3 ); |
206 | Layout11->addWidget( sampleRateLabel ); | 106 | |
107 | sampleRateLabel = new QLabel(this, "sampleRateLabel" ); | ||
108 | sampleRateLabel->setText( tr( "Sample Rate:" ) ); | ||
109 | SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0 ); | ||
207 | 110 | ||
208 | sampleRate = new QComboBox( FALSE, privateLayoutWidget, "sampleRate" ); | 111 | sampleRate = new QComboBox( FALSE,this, "sampleRate" ); |
209 | sampleRate->insertItem( tr( "8000" ) ); | 112 | sampleRate->insertItem( tr( "8000" ) ); |
210 | sampleRate->insertItem( tr( "11025" ) ); | 113 | sampleRate->insertItem( tr( "11025" ) ); |
211 | sampleRate->insertItem( tr( "22050" ) ); | 114 | sampleRate->insertItem( tr( "22050" ) ); |
212 | sampleRate->insertItem( tr( "33075" ) ); | 115 | sampleRate->insertItem( tr( "33075" ) ); |
213 | sampleRate->insertItem( tr( "44100" ) ); | 116 | sampleRate->insertItem( tr( "44100" ) ); |
214 | sampleRate->setFixedWidth(90); | 117 | // sampleRate->setFixedWidth(90); |
215 | Layout11->addWidget( sampleRate ); | 118 | SoundSettingsBaseLayout->addMultiCellWidget( sampleRate, 2, 2, 0, 2 ); |
216 | |||
217 | stereoCheckBox = new QCheckBox( privateLayoutWidget, "stereoCheckBox" ); | ||
218 | stereoCheckBox->setText( tr( "Stereo" ) ); | ||
219 | Layout11->addWidget( stereoCheckBox ); | ||
220 | 119 | ||
221 | sixteenBitCheckBox = new QCheckBox( privateLayoutWidget, "sixteenBitCheckBox" ); | 120 | // QSpacerItem* spacer = new QSpacerItem( 20, 20,QSizePolicy::Expanding, QSizePolicy::Expanding ); |
222 | sixteenBitCheckBox->setText( tr( "16 bit" ) ); | 121 | // SoundSettingsBaseLayout->addItem( spacer, 1, 3 ); |
223 | Layout11->addWidget( sixteenBitCheckBox ); | ||
224 | 122 | ||
225 | AlertCheckBox = new QCheckBox( privateLayoutWidget, "AlertCheckBox" ); | 123 | TextLabel1 = new QLabel( this, "TextLabel1" ); |
226 | AlertCheckBox->setText( tr( "Visual Alerts" ) ); | 124 | TextLabel1->setText( tr( "Recording Directory:" ) ); |
227 | Layout11->addWidget( AlertCheckBox ); | 125 | SoundSettingsBaseLayout->addMultiCellWidget( TextLabel1, 3, 3, 0, 0 ); |
228 | 126 | ||
229 | TextLabel1 = new QLabel( privateLayoutWidget, "TextLabel1" ); | ||
230 | TextLabel1->setText( tr( "Location:" ) ); | ||
231 | Layout11->addWidget( TextLabel1 ); | ||
232 | 127 | ||
128 | LocationComboBox = new QComboBox( FALSE, this, "LocationComboBox" ); | ||
129 | SoundSettingsBaseLayout->addMultiCellWidget( LocationComboBox, 4, 4, 0, 2 ); | ||
233 | 130 | ||
234 | LocationComboBox = new QComboBox( FALSE, privateLayoutWidget, "LocationComboBox" ); | 131 | // QSpacerItem* spacer1 = new QSpacerItem( 20, 20,QSizePolicy::Expanding, QSizePolicy::Expanding ); |
235 | Layout11->addWidget( LocationComboBox ); | 132 | // SoundSettingsBaseLayout->addItem( spacer1, 2, 3 ); |
236 | 133 | ||
237 | QLabel *TextLabelKey; | 134 | QLabel *TextLabelKey; |
238 | TextLabelKey = new QLabel( privateLayoutWidget, "TextLabelKey" ); | 135 | TextLabelKey = new QLabel( this, "TextLabelKey" ); |
239 | TextLabelKey->setText( tr( "Record Key:" ) ); | 136 | TextLabelKey->setText( tr( "Recording Key:" ) ); |
240 | Layout11->addWidget( TextLabelKey ); | 137 | SoundSettingsBaseLayout->addMultiCellWidget(TextLabelKey , 5, 5, 0, 0 ); |
241 | 138 | ||
242 | keyComboBox = new QComboBox( FALSE, privateLayoutWidget, "keyComboBox" ); | 139 | keyComboBox = new QComboBox( FALSE, this, "keyComboBox" ); |
243 | keyComboBox->insertItem( tr( "" ) ); | 140 | keyComboBox->insertItem( tr( "" ) ); |
244 | keyComboBox->insertItem( tr( "Taskbar Icon" ) ); | 141 | keyComboBox->insertItem( tr( "Taskbar Icon" ) ); |
245 | keyComboBox->insertItem( tr( "Key_Escape" ) ); | 142 | keyComboBox->insertItem( tr( "Key_Escape" ) ); |
246 | keyComboBox->insertItem( tr( "Key_Space" ) ); | 143 | keyComboBox->insertItem( tr( "Key_Space" ) ); |
247 | keyComboBox->insertItem( tr( "Key_Home" ) ); | 144 | keyComboBox->insertItem( tr( "Key_Home" ) ); |
248 | keyComboBox->insertItem( tr( "Key_Calender" ) ); | 145 | keyComboBox->insertItem( tr( "Key_Calender" ) ); |
249 | keyComboBox->insertItem( tr( "Key_Contacts" ) ); | 146 | keyComboBox->insertItem( tr( "Key_Contacts" ) ); |
250 | keyComboBox->insertItem( tr( "Key_Menu" ) ); | 147 | keyComboBox->insertItem( tr( "Key_Menu" ) ); |
251 | keyComboBox->insertItem( tr( "Key_Mail" ) ); | 148 | keyComboBox->insertItem( tr( "Key_Mail" ) ); |
149 | SoundSettingsBaseLayout->addMultiCellWidget( keyComboBox , 6, 6, 0, 2 ); | ||
252 | 150 | ||
253 | Layout11->addWidget( keyComboBox ); | 151 | // QSpacerItem* spacer2 = new QSpacerItem( 20, 20,QSizePolicy::Expanding, QSizePolicy::Expanding ); |
152 | // SoundSettingsBaseLayout->addItem( spacer2, 3, 3 ); | ||
254 | 153 | ||
255 | QLabel *timeLimitLabel; | 154 | QLabel *timeLimitLabel; |
256 | timeLimitLabel= new QLabel( privateLayoutWidget, "timeLimitLabel" ); | 155 | timeLimitLabel= new QLabel( this, "timeLimitLabel" ); |
257 | timeLimitLabel->setText( tr( "Recording Limit:" ) ); | 156 | timeLimitLabel->setText( tr( "Recording Limit in seconds:" ) ); |
258 | Layout11->addWidget( timeLimitLabel ); | 157 | SoundSettingsBaseLayout->addMultiCellWidget( timeLimitLabel , 7, 7, 0, 0 ); |
259 | 158 | ||
260 | timeLimitComboBox = new QComboBox( FALSE, privateLayoutWidget, "timeLimitComboBox" ); | 159 | timeLimitComboBox = new QComboBox( FALSE, this, "timeLimitComboBox" ); |
261 | timeLimitComboBox->insertItem( tr( "30" ) ); | 160 | timeLimitComboBox->insertItem( tr( "30" ) ); |
262 | timeLimitComboBox->insertItem( tr( "20" ) ); | 161 | timeLimitComboBox->insertItem( tr( "20" ) ); |
263 | timeLimitComboBox->insertItem( tr( "15" ) ); | 162 | timeLimitComboBox->insertItem( tr( "15" ) ); |
264 | timeLimitComboBox->insertItem( tr( "10" ) ); | 163 | timeLimitComboBox->insertItem( tr( "10" ) ); |
265 | timeLimitComboBox->insertItem( tr( "5" ) ); | 164 | timeLimitComboBox->insertItem( tr( "5" ) ); |
165 | timeLimitComboBox->insertItem( tr( "Unlimited" ) ); | ||
266 | 166 | ||
267 | Layout11->addWidget(timeLimitComboBox); | 167 | SoundSettingsBaseLayout->addMultiCellWidget(timeLimitComboBox , 8, 8, 0, 2); |
268 | QLabel *timeLimitLabel2; | ||
269 | timeLimitLabel2= new QLabel( privateLayoutWidget, "timeLimitLabel2" ); | ||
270 | timeLimitLabel2->setText( tr( "seconds" ) ); | ||
271 | Layout11->addWidget( timeLimitLabel2 ); | ||
272 | |||
273 | Layout12_2->addWidget( GroupBox1 ); | ||
274 | // // touchsound = new QCheckBox( this, "touchsound" ); | ||
275 | // // touchsound->setText( tr( "Screen sounds" ) ); | ||
276 | // // Layout12_2->addWidget( touchsound ); | ||
277 | 168 | ||
278 | // // keysound = new QCheckBox( this, "keysound" ); | 169 | // QSpacerItem* spacer3 = new QSpacerItem( 20, 20,QSizePolicy::Expanding, QSizePolicy::Expanding ); |
279 | // // keysound->setText( tr( "Keyboard sounds" ) ); | 170 | // SoundSettingsBaseLayout->addItem( spacer3, 4, 3 ); |
280 | // // Layout12_2->addWidget( keysound ); | ||
281 | 171 | ||
282 | SoundSettingsBaseLayout->addLayout( Layout12_2, 0, 1 ); | 172 | QSpacerItem* spacer4 = new QSpacerItem( 20, 20,QSizePolicy::Expanding, QSizePolicy::Expanding ); |
173 | SoundSettingsBaseLayout->addItem( spacer4, 9, 0 ); | ||
283 | } | 174 | } |
284 | 175 | ||
285 | /* | 176 | /* |
286 | * Destroys the object and frees any allocated resources | 177 | * Destroys the object and frees any allocated resources |
287 | */ | 178 | */ |
288 | SoundSettingsBase::~SoundSettingsBase() | 179 | SoundSettingsBase::~SoundSettingsBase() |
289 | { | 180 | { |
290 | // no need to delete child widgets, Qt does it all for us | 181 | // no need to delete child widgets, Qt does it all for us |
291 | } | 182 | } |
diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h index 5622b70..30f32ca 100644 --- a/noncore/settings/sound/soundsettingsbase.h +++ b/noncore/settings/sound/soundsettingsbase.h | |||
@@ -1,67 +1,58 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** Form interface generated from reading ui file 'soundsettingsbase.ui' | 2 | ** Form interface generated from reading ui file 'soundsettingsbase.ui' |
3 | ** | 3 | ** |
4 | ** Created: Thu May 23 11:23:38 2002 | 4 | ** Created: Thu May 23 11:23:38 2002 |
5 | ** by: The User Interface Compiler (uic) | 5 | ** by: The User Interface Compiler (uic) |
6 | ** | 6 | ** |
7 | ** WARNING! All changes made in this file will be lost! | 7 | ** WARNING! All changes made in this file will be lost! |
8 | ****************************************************************************/ | 8 | ****************************************************************************/ |
9 | #ifndef SOUNDSETTINGSBASE_H | 9 | #ifndef SOUNDSETTINGSBASE_H |
10 | #define SOUNDSETTINGSBASE_H | 10 | #define SOUNDSETTINGSBASE_H |
11 | 11 | ||
12 | #include <qvariant.h> | 12 | #include <qvariant.h> |
13 | #include <qdialog.h> | 13 | #include <qdialog.h> |
14 | #include <qmainwindow.h> | 14 | #include <qmainwindow.h> |
15 | 15 | ||
16 | class QVBoxLayout; | 16 | class QVBoxLayout; |
17 | class QHBoxLayout; | 17 | class QHBoxLayout; |
18 | class QGridLayout; | 18 | class QGridLayout; |
19 | class QCheckBox; | 19 | class QCheckBox; |
20 | class QComboBox; | 20 | class QComboBox; |
21 | class QGroupBox; | 21 | class QGroupBox; |
22 | class QLabel; | 22 | class QLabel; |
23 | class QSlider; | 23 | class QSlider; |
24 | 24 | ||
25 | class SoundSettingsBase : public QMainWindow | 25 | class SoundSettingsBase : public QMainWindow |
26 | { | 26 | { |
27 | Q_OBJECT | 27 | Q_OBJECT |
28 | 28 | ||
29 | public: | 29 | public: |
30 | SoundSettingsBase( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); | 30 | SoundSettingsBase( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); |
31 | ~SoundSettingsBase(); | 31 | ~SoundSettingsBase(); |
32 | 32 | ||
33 | QGroupBox* GroupBox3; | ||
34 | QLabel* PixmapLabel1_2; | 33 | QLabel* PixmapLabel1_2; |
35 | QLabel* TextLabel1_2; | 34 | QLabel* TextLabel1_2; |
36 | QLabel* volLabel; | 35 | /* QLabel* volLabel; */ |
37 | QLabel* micLabel; | 36 | /* QLabel* micLabel; */ |
38 | QSlider* volume; | 37 | /* QSlider* volume; */ |
39 | QSlider* mic; | 38 | /* QSlider* mic; */ |
40 | QLabel* PixmapLabel2_2; | 39 | /* QLabel* PixmapLabel2_2; */ |
41 | QLabel* TextLabel2_2; | 40 | /* QLabel* TextLabel2_2; */ |
42 | QGroupBox* GroupBox1; | 41 | /* QGroupBox* GroupBox1; */ |
43 | QLabel* sampleRateLabel; | 42 | QLabel* sampleRateLabel; |
44 | QComboBox* sampleRate; | 43 | QComboBox* sampleRate; |
45 | QCheckBox* stereoCheckBox; | 44 | QCheckBox* stereoCheckBox; |
46 | QCheckBox* sixteenBitCheckBox; | 45 | QCheckBox* sixteenBitCheckBox; |
47 | QCheckBox* AlertCheckBox; | 46 | QCheckBox* AlertCheckBox; |
48 | QLabel* TextLabel1; | 47 | QLabel* TextLabel1; |
49 | QComboBox* LocationComboBox; | 48 | QComboBox* LocationComboBox; |
50 | QComboBox* keyComboBox; | 49 | QComboBox* keyComboBox; |
51 | QComboBox* timeLimitComboBox; | 50 | QComboBox* timeLimitComboBox; |
52 | bool keyReset; | 51 | bool keyReset; |
53 | protected: | 52 | protected: |
54 | QGridLayout* SoundSettingsBaseLayout; | 53 | QGridLayout* SoundSettingsBaseLayout; |
55 | QVBoxLayout* GroupBox3Layout; | ||
56 | QVBoxLayout* Layout10; | ||
57 | QHBoxLayout* Layout16; | ||
58 | QHBoxLayout* Layout13; | ||
59 | QHBoxLayout* Layout12; | ||
60 | QHBoxLayout* Layout17; | ||
61 | QVBoxLayout* Layout12_2; | ||
62 | QVBoxLayout* Layout11; | ||
63 | protected slots: | 54 | protected slots: |
64 | 55 | ||
65 | }; | 56 | }; |
66 | 57 | ||
67 | #endif // SOUNDSETTINGSBASE_H | 58 | #endif // SOUNDSETTINGSBASE_H |