-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 79 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettings.h | 7 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.cpp | 3 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.h | 5 |
4 files changed, 55 insertions, 39 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index d55a751..df3def5 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp | |||
@@ -14,211 +14,222 @@ | |||
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 | // parts copyright 2002 L.J. Potter | 20 | // parts copyright 2002 L.J. Potter |
21 | 21 | ||
22 | #include "soundsettings.h" | 22 | #include "soundsettings.h" |
23 | 23 | ||
24 | /* OPIE */ | 24 | /* OPIE */ |
25 | #include <opie2/odebug.h> | 25 | #include <opie2/odebug.h> |
26 | #include <qpe/qpeapplication.h> | 26 | #include <qpe/qpeapplication.h> |
27 | #include <qpe/config.h> | 27 | #include <qpe/config.h> |
28 | #include <qpe/qcopenvelope_qws.h> | 28 | #include <qpe/qcopenvelope_qws.h> |
29 | #include <qpe/storage.h> | 29 | #include <qpe/storage.h> |
30 | using namespace Opie::Core; | 30 | using namespace Opie::Core; |
31 | 31 | ||
32 | /* QT */ | 32 | /* QT */ |
33 | #include <qcheckbox.h> | 33 | #include <qcheckbox.h> |
34 | #include <qcombobox.h> | 34 | #include <qcombobox.h> |
35 | #include <qlabel.h> | 35 | #include <qlabel.h> |
36 | 36 | ||
37 | /* STD */ | 37 | /* STD */ |
38 | #include <sys/utsname.h> | 38 | #include <sys/utsname.h> |
39 | #include <sys/time.h> | 39 | #include <sys/time.h> |
40 | #include <sys/types.h> | 40 | #include <sys/types.h> |
41 | #include <unistd.h> | 41 | #include <unistd.h> |
42 | #include <sys/stat.h> | 42 | #include <sys/stat.h> |
43 | 43 | ||
44 | 44 | ||
45 | SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) | 45 | SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) |
46 | : SoundSettingsBase( parent, objname, TRUE, fl ) | 46 | : SoundSettingsBase( parent, objname, true, fl ) |
47 | { | 47 | { |
48 | keyReset=FALSE; | 48 | keyReset=false; |
49 | noWarning=false; | 49 | noWarning=false; |
50 | Config config( "qpe"); | 50 | Config config( "qpe"); |
51 | config.setGroup( "Volume" ); | 51 | config.setGroup( "Volume" ); |
52 | Config cfg("Vmemo"); | 52 | Config cfg("Vmemo"); |
53 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 53 | |
54 | AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); | 54 | |
55 | // connect(qApp,SIGNAL(aboutToQuit()),SLOT(cleanUp())); | ||
56 | |||
57 | AlertCheckBox->setChecked( cfg.readBoolEntry("Alert", 1)); | ||
55 | 58 | ||
56 | cfg.setGroup("Record"); | 59 | cfg.setGroup("Record"); |
57 | int rate=config.readNumEntry("SampleRate", 22050); | 60 | int rate=config.readNumEntry("SampleRate", 22050); |
58 | if(rate == 8000) | 61 | if(rate == 8000) |
59 | sampleRate->setCurrentItem(0); | 62 | sampleRate->setCurrentItem(0); |
60 | else if(rate == 11025) | 63 | else if(rate == 11025) |
61 | sampleRate->setCurrentItem(1); | 64 | sampleRate->setCurrentItem(1); |
62 | else if(rate == 22050) | 65 | else if(rate == 22050) |
63 | sampleRate->setCurrentItem(2); | 66 | sampleRate->setCurrentItem(2); |
64 | else if(rate == 33075) | 67 | else if(rate == 33075) |
65 | sampleRate->setCurrentItem(3); | 68 | sampleRate->setCurrentItem(3); |
66 | else if(rate==44100) | 69 | else if(rate==44100) |
67 | sampleRate->setCurrentItem(4); | 70 | sampleRate->setCurrentItem(4); |
68 | 71 | ||
69 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); | 72 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); |
70 | //TODO hide if zaurus- mono only | 73 | //TODO hide if zaurus- mono only |
71 | 74 | ||
72 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) | 75 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) |
73 | //since ipaq and zaurus have particular | 76 | //since ipaq and zaurus have particular |
74 | //devices | 77 | //devices |
75 | bool systemZaurus=FALSE; | 78 | bool systemZaurus=false; |
76 | struct utsname name; /* check for embedix kernel running on the zaurus*/ | 79 | struct utsname name; /* check for embedix kernel running on the zaurus*/ |
77 | if (uname(&name) != -1) {// TODO change this here,... | 80 | if (uname(&name) != -1) {// TODO change this here,... |
78 | QString release=name.release; | 81 | QString release=name.release; |
79 | if( release.find("embedix",0,TRUE) != -1) { | 82 | if( release.find("embedix",0,true) != -1) { |
80 | odebug << "IS System Zaurus" << oendl; | 83 | odebug << "IS System Zaurus" << oendl; |
81 | systemZaurus=TRUE; | 84 | systemZaurus=true; |
82 | } | 85 | } |
83 | } | 86 | } |
84 | if(!systemZaurus) { | 87 | if(!systemZaurus) { |
85 | stereoCheckBox->setChecked(TRUE); | 88 | stereoCheckBox->setChecked(true); |
86 | } | 89 | } |
87 | stereoCheckBox->setEnabled(FALSE); | 90 | stereoCheckBox->setEnabled(false); |
88 | sixteenBitCheckBox->setEnabled(FALSE); | 91 | sixteenBitCheckBox->setEnabled(false); |
89 | #else | 92 | #else |
90 | #endif | 93 | #endif |
91 | int sRate=cfg.readNumEntry("SizeLimit", 30); | 94 | int sRate=cfg.readNumEntry("SizeLimit", 30); |
92 | odebug << "" << sRate << "" << oendl; | 95 | odebug << "" << sRate << "" << oendl; |
93 | 96 | ||
94 | if(sRate ==30) | 97 | if(sRate == 30) |
95 | timeLimitComboBox->setCurrentItem(0); | 98 | timeLimitComboBox->setCurrentItem(0); |
96 | else if(sRate==20) | 99 | else if(sRate == 20) |
97 | timeLimitComboBox->setCurrentItem(1); | 100 | timeLimitComboBox->setCurrentItem(1); |
98 | else if(sRate == 15) | 101 | else if(sRate == 15) |
99 | timeLimitComboBox->setCurrentItem(2); | 102 | timeLimitComboBox->setCurrentItem(2); |
100 | else if(sRate == 10) | 103 | else if(sRate == 10) |
101 | timeLimitComboBox->setCurrentItem(3); | 104 | timeLimitComboBox->setCurrentItem(3); |
102 | else if(sRate == 5) | 105 | else if(sRate == 5) |
103 | timeLimitComboBox->setCurrentItem(4); | 106 | timeLimitComboBox->setCurrentItem(4); |
104 | else | 107 | else |
105 | timeLimitComboBox->setCurrentItem(5); | 108 | timeLimitComboBox->setCurrentItem(5); |
106 | 109 | ||
107 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); | 110 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); |
108 | 111 | ||
109 | cfg.setGroup("Defaults"); | 112 | cfg.setGroup("Defaults"); |
110 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); | 113 | recordKey = cfg.readNumEntry("toggleKey"); |
114 | keyComboBox->setCurrentItem( recordKey); | ||
111 | 115 | ||
112 | updateStorageCombo(); | 116 | updateStorageCombo(); |
113 | 117 | ||
114 | Config vmCfg("Vmemo"); | 118 | Config vmCfg("Vmemo"); |
115 | vmCfg.setGroup("Defaults"); | 119 | vmCfg.setGroup("Defaults"); |
116 | adpcmCheckBox->setChecked( vmCfg.readBoolEntry("use_ADPCM", 0)); | 120 | adpcmCheckBox->setChecked( vmCfg.readBoolEntry("use_ADPCM", 0)); |
117 | 121 | ||
118 | connect( LocationComboBox,SIGNAL(activated(const QString&)), this, | 122 | connect(LocationComboBox,SIGNAL(activated(const QString&)),this,SLOT(setLocation(const QString&))); |
119 | SLOT( setLocation(const QString&))); | 123 | connect(keyComboBox,SIGNAL(activated(int)),this,SLOT(setKeyButton(int))); |
120 | connect( keyComboBox,SIGNAL(activated(int)), this, | 124 | connect(timeLimitComboBox,SIGNAL(activated(const QString&)),this,SLOT(setSizeLimitButton(const QString&))); |
121 | SLOT( setKeyButton(int))); | 125 | connect(restartCheckBox,SIGNAL( toggled(bool)),this,SLOT(restartOpie(bool))); |
122 | connect( timeLimitComboBox,SIGNAL(activated(const QString&)), this, | 126 | connect(adpcmCheckBox,SIGNAL( toggled(bool)),this,SLOT(slotAdpcm(bool))); |
123 | SLOT( setSizeLimitButton(const QString&))); | ||
124 | connect( restartCheckBox,SIGNAL( toggled(bool)), this, | ||
125 | SLOT( restartOpie(bool))); | ||
126 | connect( adpcmCheckBox,SIGNAL( toggled(bool)), this, | ||
127 | SLOT( slotAdpcm(bool))); | ||
128 | 127 | ||
129 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 128 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
130 | } | 129 | } |
131 | 130 | ||
132 | void SoundSettings::updateStorageCombo() { | 131 | void SoundSettings::updateStorageCombo() { |
133 | 132 | ||
134 | Config config( "Vmemo" ); | 133 | Config config( "Vmemo" ); |
135 | config.setGroup( "System" ); | 134 | config.setGroup( "System" ); |
136 | QString loc = config.readEntry("RecLocation","/"); | 135 | QString loc = config.readEntry("RecLocation","/"); |
137 | int i=0; | 136 | int i = 0; |
138 | int set=0; | 137 | int set = 0; |
139 | StorageInfo storageInfo; | 138 | StorageInfo storageInfo; |
140 | QString sName, sPath; | 139 | QString sName, sPath; |
141 | QStringList list; | 140 | QStringList list; |
142 | list << "Documents : "+QPEApplication::documentDir(); | 141 | list << "Documents : "+QPEApplication::documentDir(); |
143 | list << "tmp : /tmp"; | 142 | list << "tmp : /tmp"; |
144 | 143 | ||
145 | const QList<FileSystem> &fs = storageInfo.fileSystems(); | 144 | const QList<FileSystem> &fs = storageInfo.fileSystems(); |
146 | QListIterator<FileSystem> it ( fs ); | 145 | QListIterator<FileSystem> it ( fs ); |
147 | for( ; it.current(); ++it ){ | 146 | for( ; it.current(); ++it ){ |
148 | const QString name = (*it)->name(); | 147 | const QString name = (*it)->name(); |
149 | const QString path = (*it)->path(); | 148 | const QString path = (*it)->path(); |
150 | odebug << "storage name "+name +" storage path is "+path << oendl; | 149 | odebug << "storage name "+name +" storage path is "+path << oendl; |
151 | list << name + ": " +path; | 150 | list << name + ": " +path; |
152 | if( loc.find( path,0,TRUE) != -1) | 151 | if( loc.find( path,0,true) != -1) |
153 | set = i; | 152 | set = i; |
154 | // if(dit.current()->file().find(path) != -1 ) storage=name; | 153 | // if(dit.current()->file().find(path) != -1 ) storage=name; |
155 | i++; | 154 | i++; |
156 | } | 155 | } |
157 | 156 | ||
158 | LocationComboBox->insertStringList(list); | 157 | LocationComboBox->insertStringList(list); |
159 | odebug << "set item " << set << "" << oendl; | 158 | odebug << "set item " << set << "" << oendl; |
160 | LocationComboBox->setCurrentItem(set); | 159 | LocationComboBox->setCurrentItem(set); |
161 | } | 160 | } |
162 | 161 | ||
163 | void SoundSettings::setLocation(const QString & string) { | 162 | void SoundSettings::setLocation(const QString & string) { |
164 | Config config( "Vmemo" ); | 163 | Config config( "Vmemo" ); |
165 | config.setGroup( "System" ); | 164 | config.setGroup( "System" ); |
166 | config.writeEntry("RecLocation",string); | 165 | config.writeEntry("RecLocation",string); |
167 | odebug << "set location "+string << oendl; | 166 | odebug << "set location "+string << oendl; |
168 | config.write(); | 167 | config.write(); |
169 | } | 168 | } |
170 | 169 | ||
170 | void SoundSettings::accept() { | ||
171 | cleanUp(); | ||
172 | qApp->quit(); | ||
173 | } | ||
174 | |||
175 | |||
171 | void SoundSettings::cleanUp() { | 176 | void SoundSettings::cleanUp() { |
177 | |||
172 | Config cfg("Vmemo"); | 178 | Config cfg("Vmemo"); |
173 | cfg.writeEntry("Alert",AlertCheckBox->isChecked()); | 179 | cfg.writeEntry("Alert",AlertCheckBox->isChecked()); |
174 | 180 | ||
175 | cfg.setGroup("Record"); | 181 | cfg.setGroup("Record"); |
176 | cfg.writeEntry("SampleRate",sampleRate->currentText()); | 182 | cfg.writeEntry("SampleRate",sampleRate->currentText()); |
177 | cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); | 183 | cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); |
178 | cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); | 184 | cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); |
179 | if(keyReset && noWarning) { | 185 | if(keyReset && noWarning) { |
180 | QCopEnvelope ("QPE/System", "restart()"); | 186 | QCopEnvelope ("QPE/System", "restart()"); |
181 | } | 187 | } |
188 | cfg.setGroup("Defaults"); | ||
189 | cfg.writeEntry( "toggleKey", recordKey); | ||
190 | if( recordKey == 1) { | ||
191 | cfg.writeEntry( "hideIcon", 0 ); | ||
192 | } | ||
193 | else { | ||
194 | cfg.writeEntry( "hideIcon", 1); | ||
195 | } | ||
196 | cfg.write(); | ||
182 | } | 197 | } |
183 | 198 | ||
184 | void SoundSettings::setKeyButton( int index) { | 199 | void SoundSettings::setKeyButton( int index) { |
185 | Config cfg("Vmemo"); | 200 | recordKey = index; |
186 | cfg.setGroup("Defaults"); | 201 | restartCheckBox->setChecked(true); |
187 | cfg.writeEntry( "toggleKey", index ); | 202 | keyReset = true; |
188 | keyReset = TRUE; | ||
189 | if( index == 1) { | 203 | if( index == 1) { |
190 | cfg.writeEntry( "hideIcon", 0 ); | ||
191 | keyLabel->setText(tr("Shows icon")); | 204 | keyLabel->setText(tr("Shows icon")); |
192 | } | 205 | } |
193 | else { | 206 | else { |
194 | cfg.writeEntry( "hideIcon", 1); | ||
195 | keyLabel->setText(tr("Hides icon")); | 207 | keyLabel->setText(tr("Hides icon")); |
196 | } | 208 | } |
197 | cfg.write(); | ||
198 | } | 209 | } |
199 | 210 | ||
200 | void SoundSettings::updateLocationCombo() { | 211 | void SoundSettings::updateLocationCombo() { |
201 | 212 | ||
202 | } | 213 | } |
203 | 214 | ||
204 | void SoundSettings::setSizeLimitButton(const QString &index) { | 215 | void SoundSettings::setSizeLimitButton(const QString &index) { |
205 | 216 | ||
206 | Config cfg("Vmemo"); | 217 | Config cfg("Vmemo"); |
207 | cfg.setGroup("Record"); | 218 | cfg.setGroup("Record"); |
208 | if(index.find("Unlimited",0,TRUE) != -1) | 219 | if(index.find("Unlimited",0,true) != -1) |
209 | cfg.writeEntry("SizeLimit", -1); | 220 | cfg.writeEntry("SizeLimit", -1); |
210 | else | 221 | else |
211 | cfg.writeEntry("SizeLimit", index); | 222 | cfg.writeEntry("SizeLimit", index); |
212 | cfg.write(); | 223 | cfg.write(); |
213 | } | 224 | } |
214 | 225 | ||
215 | void SoundSettings::restartOpie(bool b) { | 226 | void SoundSettings::restartOpie(bool b) { |
216 | noWarning=b; | 227 | noWarning=b; |
217 | } | 228 | } |
218 | 229 | ||
219 | void SoundSettings::slotAdpcm(bool b) { | 230 | void SoundSettings::slotAdpcm(bool b) { |
220 | Config vmCfg("Vmemo"); | 231 | Config vmCfg("Vmemo"); |
221 | vmCfg.setGroup("Defaults"); | 232 | vmCfg.setGroup("Defaults"); |
222 | vmCfg.writeEntry("use_ADPCM", b); | 233 | vmCfg.writeEntry("use_ADPCM", b); |
223 | vmCfg.write(); | 234 | vmCfg.write(); |
224 | } | 235 | } |
diff --git a/noncore/settings/sound/soundsettings.h b/noncore/settings/sound/soundsettings.h index 57a360f..9db664a 100644 --- a/noncore/settings/sound/soundsettings.h +++ b/noncore/settings/sound/soundsettings.h | |||
@@ -2,52 +2,55 @@ | |||
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 | static QString appName() { return QString::fromLatin1("sound"); } | 32 | static QString appName() { return QString::fromLatin1("sound"); } |
33 | SoundSettings( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 33 | SoundSettings( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
34 | // ~SoundSettings(); | ||
34 | 35 | ||
35 | protected: | 36 | protected: |
36 | bool noWarning; | 37 | int recordKey, hideIt; |
37 | /* void accept(); */ | 38 | bool noWarning; |
39 | void accept(); | ||
38 | /* void reject(); */ | 40 | /* void reject(); */ |
39 | void updateStorageCombo(); | 41 | void updateStorageCombo(); |
40 | void updateLocationCombo(); | 42 | void updateLocationCombo(); |
41 | 43 | ||
42 | private slots: | 44 | private slots: |
45 | //void closeEvent(QCloseEvent * ); | ||
43 | void setKeyButton( int); | 46 | void setKeyButton( int); |
44 | void setSizeLimitButton(const QString &); | 47 | void setSizeLimitButton(const QString &); |
45 | void setLocation(const QString &); | 48 | void setLocation(const QString &); |
46 | void cleanUp(); | 49 | void cleanUp(); |
47 | void restartOpie(bool); | 50 | void restartOpie(bool); |
48 | void slotAdpcm(bool); | 51 | void slotAdpcm(bool); |
49 | }; | 52 | }; |
50 | 53 | ||
51 | 54 | ||
52 | #endif // SOUNDSETTINGS_H | 55 | #endif // SOUNDSETTINGS_H |
53 | 56 | ||
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp index 84187d2..2d894c6 100644 --- a/noncore/settings/sound/soundsettingsbase.cpp +++ b/noncore/settings/sound/soundsettingsbase.cpp | |||
@@ -39,65 +39,66 @@ static const char* const image0_data[] = { | |||
39 | 39 | ||
40 | static const char* const image1_data[] = { | 40 | static const char* const image1_data[] = { |
41 | "16 16 3 1", | 41 | "16 16 3 1", |
42 | ". c None", | 42 | ". c None", |
43 | "# c #000000", | 43 | "# c #000000", |
44 | "a c #ff0000", | 44 | "a c #ff0000", |
45 | "................", | 45 | "................", |
46 | "................", | 46 | "................", |
47 | "................", | 47 | "................", |
48 | ".....#..........", | 48 | ".....#..........", |
49 | "....##..........", | 49 | "....##..........", |
50 | "...###...a...a..", | 50 | "...###...a...a..", |
51 | "######..aaa.aaa.", | 51 | "######..aaa.aaa.", |
52 | "######...aaaaa..", | 52 | "######...aaaaa..", |
53 | "######....aaa...", | 53 | "######....aaa...", |
54 | "######...aaaaa..", | 54 | "######...aaaaa..", |
55 | "######..aaa.aaa.", | 55 | "######..aaa.aaa.", |
56 | "...###...a...a..", | 56 | "...###...a...a..", |
57 | "....##..........", | 57 | "....##..........", |
58 | ".....#..........", | 58 | ".....#..........", |
59 | "................", | 59 | "................", |
60 | "................"}; | 60 | "................"}; |
61 | 61 | ||
62 | 62 | ||
63 | /* | 63 | /* |
64 | * Constructs a SoundSettingsBase which is a child of 'parent', with the | 64 | * Constructs a SoundSettingsBase which is a child of 'parent', with the |
65 | * name 'name' and widget flags set to 'f' | 65 | * name 'name' and widget flags set to 'f' |
66 | * | 66 | * |
67 | * The dialog will by default be modeless, unless you set 'modal' to | 67 | * The dialog will by default be modeless, unless you set 'modal' to |
68 | * TRUE to construct a modal dialog. | 68 | * TRUE to construct a modal dialog. |
69 | */ | 69 | */ |
70 | SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl ) | 70 | SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl ) |
71 | : QMainWindow( parent, name, fl ) | 71 | : QDialog( parent, name, fl ) |
72 | // : QMainWindow( parent, name, fl ) | ||
72 | { | 73 | { |
73 | QPixmap image0( ( const char** ) image0_data ); | 74 | QPixmap image0( ( const char** ) image0_data ); |
74 | QPixmap image1( ( const char** ) image1_data ); | 75 | QPixmap image1( ( const char** ) image1_data ); |
75 | if ( !name ) | 76 | if ( !name ) |
76 | setName( "SoundSettingsBase" ); | 77 | setName( "SoundSettingsBase" ); |
77 | // resize(255,301); | 78 | // resize(255,301); |
78 | setCaption( tr( "Vmemo Settings" ) ); | 79 | setCaption( tr( "Vmemo Settings" ) ); |
79 | 80 | ||
80 | SoundSettingsBaseLayout = new QGridLayout( this ); | 81 | SoundSettingsBaseLayout = new QGridLayout( this ); |
81 | SoundSettingsBaseLayout->setSpacing( 4 ); | 82 | SoundSettingsBaseLayout->setSpacing( 4 ); |
82 | SoundSettingsBaseLayout->setMargin( 4 ); | 83 | SoundSettingsBaseLayout->setMargin( 4 ); |
83 | 84 | ||
84 | QHBoxLayout *Layout11; | 85 | QHBoxLayout *Layout11; |
85 | Layout11 = new QHBoxLayout; | 86 | Layout11 = new QHBoxLayout; |
86 | Layout11->setSpacing( 4 ); | 87 | Layout11->setSpacing( 4 ); |
87 | Layout11->setMargin( 0 ); | 88 | Layout11->setMargin( 0 ); |
88 | 89 | ||
89 | stereoCheckBox = new QCheckBox( this, "stereoCheckBox" ); | 90 | stereoCheckBox = new QCheckBox( this, "stereoCheckBox" ); |
90 | stereoCheckBox->setText( tr( "Stereo" ) ); | 91 | stereoCheckBox->setText( tr( "Stereo" ) ); |
91 | Layout11->addWidget( stereoCheckBox ); | 92 | Layout11->addWidget( stereoCheckBox ); |
92 | 93 | ||
93 | sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" ); | 94 | sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" ); |
94 | sixteenBitCheckBox->setText( tr( "16 bit" ) ); | 95 | sixteenBitCheckBox->setText( tr( "16 bit" ) ); |
95 | Layout11->addWidget( sixteenBitCheckBox ); | 96 | Layout11->addWidget( sixteenBitCheckBox ); |
96 | 97 | ||
97 | AlertCheckBox = new QCheckBox( this, "AlertCheckBox" ); | 98 | AlertCheckBox = new QCheckBox( this, "AlertCheckBox" ); |
98 | AlertCheckBox->setText( tr( "Visual Alerts" ) ); | 99 | AlertCheckBox->setText( tr( "Visual Alerts" ) ); |
99 | Layout11->addWidget( AlertCheckBox ); | 100 | Layout11->addWidget( AlertCheckBox ); |
100 | 101 | ||
101 | SoundSettingsBaseLayout->addLayout( Layout11, 0, 0); | 102 | SoundSettingsBaseLayout->addLayout( Layout11, 0, 0); |
102 | 103 | ||
103 | sampleRateLabel = new QLabel(this, "sampleRateLabel" ); | 104 | sampleRateLabel = new QLabel(this, "sampleRateLabel" ); |
diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h index 48c31e8..0234925 100644 --- a/noncore/settings/sound/soundsettingsbase.h +++ b/noncore/settings/sound/soundsettingsbase.h | |||
@@ -1,57 +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 QDialog |
26 | //class SoundSettingsBase : public QMainWindow | ||
26 | { | 27 | { |
27 | Q_OBJECT | 28 | Q_OBJECT |
28 | 29 | ||
29 | public: | 30 | public: |
30 | SoundSettingsBase( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); | 31 | SoundSettingsBase( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); |
31 | ~SoundSettingsBase(); | 32 | ~SoundSettingsBase(); |
32 | 33 | ||
33 | QLabel* PixmapLabel1_2; | 34 | QLabel* PixmapLabel1_2; |
34 | QLabel* TextLabel1_2; | 35 | QLabel* TextLabel1_2; |
35 | QLabel *keyLabel; | 36 | QLabel *keyLabel; |
36 | /* QLabel* volLabel; */ | 37 | /* QLabel* volLabel; */ |
37 | /* QLabel* micLabel; */ | 38 | /* QLabel* micLabel; */ |
38 | /* QSlider* volume; */ | 39 | /* QSlider* volume; */ |
39 | /* QSlider* mic; */ | 40 | /* QSlider* mic; */ |
40 | /* QLabel* PixmapLabel2_2; */ | 41 | /* QLabel* PixmapLabel2_2; */ |
41 | /* QLabel* TextLabel2_2; */ | 42 | /* QLabel* TextLabel2_2; */ |
42 | /* QGroupBox* GroupBox1; */ | 43 | /* QGroupBox* GroupBox1; */ |
43 | QLabel* sampleRateLabel; | 44 | QLabel* sampleRateLabel; |
44 | QComboBox* sampleRate; | 45 | QComboBox* sampleRate; |
45 | QCheckBox* stereoCheckBox; | 46 | QCheckBox* stereoCheckBox; |
46 | QCheckBox* sixteenBitCheckBox; | 47 | QCheckBox* sixteenBitCheckBox; |
47 | QCheckBox* AlertCheckBox; | 48 | QCheckBox* AlertCheckBox; |
48 | QLabel* TextLabel1; | 49 | QLabel* TextLabel1; |
49 | QComboBox* LocationComboBox; | 50 | QComboBox* LocationComboBox; |
50 | QComboBox* keyComboBox; | 51 | QComboBox* keyComboBox; |
51 | QComboBox* timeLimitComboBox; | 52 | QComboBox* timeLimitComboBox; |
52 | QCheckBox *restartCheckBox; | 53 | QCheckBox *restartCheckBox; |
53 | QCheckBox *adpcmCheckBox; | 54 | QCheckBox *adpcmCheckBox; |
54 | 55 | ||
55 | bool keyReset; | 56 | bool keyReset; |
56 | protected: | 57 | protected: |
57 | QGridLayout* SoundSettingsBaseLayout; | 58 | QGridLayout* SoundSettingsBaseLayout; |