summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-05-26 04:21:39 (UTC)
committer llornkcor <llornkcor>2003-05-26 04:21:39 (UTC)
commit57e35a76319a949cb9c065aabf953645b79e7d96 (patch) (unidiff)
tree2397ee1eee9bb2c5fb765f206a81d5b9da789f03
parentf63dee18fe56ba54d9203836722a1f499e2539f3 (diff)
downloadopie-57e35a76319a949cb9c065aabf953645b79e7d96.zip
opie-57e35a76319a949cb9c065aabf953645b79e7d96.tar.gz
opie-57e35a76319a949cb9c065aabf953645b79e7d96.tar.bz2
remove extra includes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp4
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp9
2 files changed, 0 insertions, 13 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index afcdd49..09d2e92 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -1,211 +1,207 @@
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// 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#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
25#include <qpe/config.h> 25#include <qpe/config.h>
26#include <qpe/qcopenvelope_qws.h> 26#include <qpe/qcopenvelope_qws.h>
27#include <qpe/storage.h> 27#include <qpe/storage.h>
28 28
29#include <qmessagebox.h>
30#include <qapplication.h>
31#include <qslider.h>
32#include <qcheckbox.h> 29#include <qcheckbox.h>
33#include <qlineedit.h>
34#include <qcombobox.h> 30#include <qcombobox.h>
35#include <qlabel.h> 31#include <qlabel.h>
36 32
37#include <sys/utsname.h> 33#include <sys/utsname.h>
38#include <sys/time.h> 34#include <sys/time.h>
39#include <sys/types.h> 35#include <sys/types.h>
40#include <unistd.h> 36#include <unistd.h>
41#include <stdio.h> 37#include <stdio.h>
42#include <sys/stat.h> 38#include <sys/stat.h>
43 39
44 40
45SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) 41SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
46 : SoundSettingsBase( parent, objname, TRUE, fl ) 42 : SoundSettingsBase( parent, objname, TRUE, fl )
47{ 43{
48 keyReset=FALSE; 44 keyReset=FALSE;
49 noWarning=false; 45 noWarning=false;
50 Config config( "qpe"); 46 Config config( "qpe");
51 config.setGroup( "Volume" ); 47 config.setGroup( "Volume" );
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)); 65 stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0));
70//TODO hide if zaurus- mono only 66//TODO hide if zaurus- mono only
71 67
72#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) 68#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX)
73//since ipaq and zaurus have particular 69//since ipaq and zaurus have particular
74//devices 70//devices
75 bool systemZaurus=FALSE; 71 bool systemZaurus=FALSE;
76 struct utsname name; /* check for embedix kernel running on the zaurus*/ 72 struct utsname name; /* check for embedix kernel running on the zaurus*/
77 if (uname(&name) != -1) {// TODO change this here,... 73 if (uname(&name) != -1) {// TODO change this here,...
78 QString release=name.release; 74 QString release=name.release;
79 if( release.find("embedix",0,TRUE) != -1) { 75 if( release.find("embedix",0,TRUE) != -1) {
80 qDebug("IS System Zaurus"); 76 qDebug("IS System Zaurus");
81 systemZaurus=TRUE; 77 systemZaurus=TRUE;
82 } 78 }
83 } 79 }
84 if(!systemZaurus) { 80 if(!systemZaurus) {
85 stereoCheckBox->setChecked(TRUE); 81 stereoCheckBox->setChecked(TRUE);
86 } 82 }
87 stereoCheckBox->setEnabled(FALSE); 83 stereoCheckBox->setEnabled(FALSE);
88 sixteenBitCheckBox->setEnabled(FALSE); 84 sixteenBitCheckBox->setEnabled(FALSE);
89#else 85#else
90#endif 86#endif
91 int sRate=cfg.readNumEntry("SizeLimit", 30); 87 int sRate=cfg.readNumEntry("SizeLimit", 30);
92 qDebug("%d",sRate); 88 qDebug("%d",sRate);
93 89
94 if(sRate ==30) 90 if(sRate ==30)
95 timeLimitComboBox->setCurrentItem(0); 91 timeLimitComboBox->setCurrentItem(0);
96 else if(sRate==20) 92 else if(sRate==20)
97 timeLimitComboBox->setCurrentItem(1); 93 timeLimitComboBox->setCurrentItem(1);
98 else if(sRate == 15) 94 else if(sRate == 15)
99 timeLimitComboBox->setCurrentItem(2); 95 timeLimitComboBox->setCurrentItem(2);
100 else if(sRate == 10) 96 else if(sRate == 10)
101 timeLimitComboBox->setCurrentItem(3); 97 timeLimitComboBox->setCurrentItem(3);
102 else if(sRate == 5) 98 else if(sRate == 5)
103 timeLimitComboBox->setCurrentItem(4); 99 timeLimitComboBox->setCurrentItem(4);
104 else 100 else
105 timeLimitComboBox->setCurrentItem(5); 101 timeLimitComboBox->setCurrentItem(5);
106 102
107 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); 103 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1));
108 104
109 cfg.setGroup("Defaults"); 105 cfg.setGroup("Defaults");
110 keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); 106 keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") );
111 107
112 updateStorageCombo(); 108 updateStorageCombo();
113 connect( LocationComboBox,SIGNAL(activated(const QString &)), this, 109 connect( LocationComboBox,SIGNAL(activated(const QString &)), this,
114 SLOT( setLocation(const QString &))); 110 SLOT( setLocation(const QString &)));
115 connect( keyComboBox,SIGNAL(activated( int)), this, 111 connect( keyComboBox,SIGNAL(activated( int)), this,
116 SLOT( setKeyButton( int))); 112 SLOT( setKeyButton( int)));
117 connect( timeLimitComboBox,SIGNAL(activated( const QString &)), this, 113 connect( timeLimitComboBox,SIGNAL(activated( const QString &)), this,
118 SLOT( setSizeLimitButton(const QString &))); 114 SLOT( setSizeLimitButton(const QString &)));
119 connect( restartCheckBox,SIGNAL( toggled( bool)), this, 115 connect( restartCheckBox,SIGNAL( toggled( bool)), this,
120 SLOT( restartOpie( bool))); 116 SLOT( restartOpie( bool)));
121// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 117// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
122} 118}
123 119
124void SoundSettings::updateStorageCombo() { 120void SoundSettings::updateStorageCombo() {
125 121
126 Config config( "Vmemo" ); 122 Config config( "Vmemo" );
127 config.setGroup( "System" ); 123 config.setGroup( "System" );
128 QString loc = config.readEntry("RecLocation","/"); 124 QString loc = config.readEntry("RecLocation","/");
129 int i=0; 125 int i=0;
130 int set=0; 126 int set=0;
131 StorageInfo storageInfo; 127 StorageInfo storageInfo;
132 QString sName, sPath; 128 QString sName, sPath;
133 QStringList list; 129 QStringList list;
134 list << "Documents : "+QPEApplication::documentDir(); 130 list << "Documents : "+QPEApplication::documentDir();
135 list << "tmp : /tmp"; 131 list << "tmp : /tmp";
136 132
137 const QList<FileSystem> &fs = storageInfo.fileSystems(); 133 const QList<FileSystem> &fs = storageInfo.fileSystems();
138 QListIterator<FileSystem> it ( fs ); 134 QListIterator<FileSystem> it ( fs );
139 for( ; it.current(); ++it ){ 135 for( ; it.current(); ++it ){
140 const QString name = (*it)->name(); 136 const QString name = (*it)->name();
141 const QString path = (*it)->path(); 137 const QString path = (*it)->path();
142 qDebug("storage name "+name +" storage path is "+path); 138 qDebug("storage name "+name +" storage path is "+path);
143 list << name + ": " +path; 139 list << name + ": " +path;
144 if( loc.find( path,0,TRUE) != -1) 140 if( loc.find( path,0,TRUE) != -1)
145 set = i; 141 set = i;
146// if(dit.current()->file().find(path) != -1 ) storage=name; 142// if(dit.current()->file().find(path) != -1 ) storage=name;
147 i++; 143 i++;
148 } 144 }
149 145
150 LocationComboBox->insertStringList(list); 146 LocationComboBox->insertStringList(list);
151 qDebug("set item %d", set); 147 qDebug("set item %d", set);
152 LocationComboBox->setCurrentItem(set); 148 LocationComboBox->setCurrentItem(set);
153} 149}
154 150
155void SoundSettings::setLocation(const QString & string) { 151void SoundSettings::setLocation(const QString & string) {
156 Config config( "Vmemo" ); 152 Config config( "Vmemo" );
157 config.setGroup( "System" ); 153 config.setGroup( "System" );
158 config.writeEntry("RecLocation",string); 154 config.writeEntry("RecLocation",string);
159 qDebug("set location "+string); 155 qDebug("set location "+string);
160 config.write(); 156 config.write();
161} 157}
162 158
163void SoundSettings::cleanUp() { 159void SoundSettings::cleanUp() {
164 Config cfg("Vmemo"); 160 Config cfg("Vmemo");
165 cfg.writeEntry("Alert",AlertCheckBox->isChecked()); 161 cfg.writeEntry("Alert",AlertCheckBox->isChecked());
166 162
167 cfg.setGroup("Record"); 163 cfg.setGroup("Record");
168 cfg.writeEntry("SampleRate",sampleRate->currentText()); 164 cfg.writeEntry("SampleRate",sampleRate->currentText());
169 cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); 165 cfg.writeEntry("Stereo",stereoCheckBox->isChecked());
170 cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); 166 cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
171 167
172 if(keyReset && noWarning) { 168 if(keyReset && noWarning) {
173 QCopEnvelope ("QPE/System", "restart()"); 169 QCopEnvelope ("QPE/System", "restart()");
174 } 170 }
175} 171}
176 172
177void SoundSettings::setKeyButton( int index) { 173void SoundSettings::setKeyButton( int index) {
178 Config cfg("Vmemo"); 174 Config cfg("Vmemo");
179 cfg.setGroup("Defaults"); 175 cfg.setGroup("Defaults");
180 cfg.writeEntry( "toggleKey", index ); 176 cfg.writeEntry( "toggleKey", index );
181 keyReset = TRUE; 177 keyReset = TRUE;
182 if( index == 1) { 178 if( index == 1) {
183 cfg.writeEntry( "hideIcon", 0 ); 179 cfg.writeEntry( "hideIcon", 0 );
184 keyLabel->setText(tr("Shows icon")); 180 keyLabel->setText(tr("Shows icon"));
185 } 181 }
186 else { 182 else {
187 cfg.writeEntry( "hideIcon", 1); 183 cfg.writeEntry( "hideIcon", 1);
188 keyLabel->setText(tr("Hides icon")); 184 keyLabel->setText(tr("Hides icon"));
189 } 185 }
190 cfg.write(); 186 cfg.write();
191} 187}
192 188
193void SoundSettings::updateLocationCombo() { 189void SoundSettings::updateLocationCombo() {
194 190
195} 191}
196 192
197void SoundSettings::setSizeLimitButton(const QString &index) { 193void SoundSettings::setSizeLimitButton(const QString &index) {
198 194
199 Config cfg("Vmemo"); 195 Config cfg("Vmemo");
200 cfg.setGroup("Record"); 196 cfg.setGroup("Record");
201 if(index.find("Unlimited",0,TRUE) != -1) 197 if(index.find("Unlimited",0,TRUE) != -1)
202 cfg.writeEntry("SizeLimit", -1); 198 cfg.writeEntry("SizeLimit", -1);
203 else 199 else
204 cfg.writeEntry("SizeLimit", index); 200 cfg.writeEntry("SizeLimit", index);
205 cfg.write(); 201 cfg.write();
206} 202}
207 203
208void SoundSettings::restartOpie(bool b) { 204void SoundSettings::restartOpie(bool b) {
209 noWarning=b; 205 noWarning=b;
210} 206}
211 207
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp
index 5421bb4..af794ba 100644
--- a/noncore/settings/sound/soundsettingsbase.cpp
+++ b/noncore/settings/sound/soundsettingsbase.cpp
@@ -1,185 +1,176 @@
1/**************************************************************************** 1/****************************************************************************
2** Form implementation generated from reading ui file 'soundsettingsbase.ui' 2** Form implementation generated from reading ui file 'soundsettingsbase.ui'
3** 3**
4** Created: Sun May 19 12:11:35 2002 4** Created: Sun May 19 12:11:35 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#include "soundsettingsbase.h" 9#include "soundsettingsbase.h"
10 10
11#include <qcheckbox.h> 11#include <qcheckbox.h>
12#include <qcombobox.h> 12#include <qcombobox.h>
13#include <qgroupbox.h>
14#include <qmainwindow.h>
15 13
16#include <qpe/qpeapplication.h>
17#include <qlabel.h> 14#include <qlabel.h>
18#include <qpushbutton.h>
19#include <qslider.h>
20#include <qlayout.h> 15#include <qlayout.h>
21#include <qvariant.h>
22#include <qtooltip.h>
23#include <qwhatsthis.h>
24#include <qimage.h>
25#include <qpixmap.h> 16#include <qpixmap.h>
26 17
27static const char* const image0_data[] = { 18static const char* const image0_data[] = {
28"16 16 3 1", 19"16 16 3 1",
29". c None", 20". c None",
30"a c #000000", 21"a c #000000",
31"# c #ff0000", 22"# c #ff0000",
32"............#...", 23"............#...",
33"............##..", 24"............##..",
34"..........#..#..", 25"..........#..#..",
35".....a..#..#.#..", 26".....a..#..#.#..",
36"....aa..##.#..#.", 27"....aa..##.#..#.",
37"...aaa...#.##.#.", 28"...aaa...#.##.#.",
38"aaaaaa.#.#..#.##", 29"aaaaaa.#.#..#.##",
39"aaaaaa.#.##.#.##", 30"aaaaaa.#.##.#.##",
40"aaaaaa.#.##.#.##", 31"aaaaaa.#.##.#.##",
41"aaaaaa.#.##.#.##", 32"aaaaaa.#.##.#.##",
42"aaaaaa.#.#..#.##", 33"aaaaaa.#.#..#.##",
43"...aaa...#.##.#.", 34"...aaa...#.##.#.",
44"....aa..#..#..#.", 35"....aa..#..#..#.",
45".....a.....#.##.", 36".....a.....#.##.",
46"..........#..#..", 37"..........#..#..",
47"............##.."}; 38"............##.."};
48 39
49static const char* const image1_data[] = { 40static const char* const image1_data[] = {
50"16 16 3 1", 41"16 16 3 1",
51". c None", 42". c None",
52"# c #000000", 43"# c #000000",
53"a c #ff0000", 44"a c #ff0000",
54"................", 45"................",
55"................", 46"................",
56"................", 47"................",
57".....#..........", 48".....#..........",
58"....##..........", 49"....##..........",
59"...###...a...a..", 50"...###...a...a..",
60"######..aaa.aaa.", 51"######..aaa.aaa.",
61"######...aaaaa..", 52"######...aaaaa..",
62"######....aaa...", 53"######....aaa...",
63"######...aaaaa..", 54"######...aaaaa..",
64"######..aaa.aaa.", 55"######..aaa.aaa.",
65"...###...a...a..", 56"...###...a...a..",
66"....##..........", 57"....##..........",
67".....#..........", 58".....#..........",
68"................", 59"................",
69"................"}; 60"................"};
70 61
71 62
72/* 63/*
73 * Constructs a SoundSettingsBase which is a child of 'parent', with the 64 * Constructs a SoundSettingsBase which is a child of 'parent', with the
74 * name 'name' and widget flags set to 'f' 65 * name 'name' and widget flags set to 'f'
75 * 66 *
76 * 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
77 * TRUE to construct a modal dialog. 68 * TRUE to construct a modal dialog.
78 */ 69 */
79SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl ) 70SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl )
80 : QMainWindow( parent, name, fl ) 71 : QMainWindow( parent, name, fl )
81{ 72{
82 QPixmap image0( ( const char** ) image0_data ); 73 QPixmap image0( ( const char** ) image0_data );
83 QPixmap image1( ( const char** ) image1_data ); 74 QPixmap image1( ( const char** ) image1_data );
84 if ( !name ) 75 if ( !name )
85 setName( "SoundSettingsBase" ); 76 setName( "SoundSettingsBase" );
86 // resize(255,301); 77 // resize(255,301);
87 setCaption( tr( "Vmemo Settings" ) ); 78 setCaption( tr( "Vmemo Settings" ) );
88 79
89 SoundSettingsBaseLayout = new QGridLayout( this ); 80 SoundSettingsBaseLayout = new QGridLayout( this );
90 SoundSettingsBaseLayout->setSpacing( 4 ); 81 SoundSettingsBaseLayout->setSpacing( 4 );
91 SoundSettingsBaseLayout->setMargin( 4 ); 82 SoundSettingsBaseLayout->setMargin( 4 );
92 83
93 QHBoxLayout *Layout11; 84 QHBoxLayout *Layout11;
94 Layout11 = new QHBoxLayout; 85 Layout11 = new QHBoxLayout;
95 Layout11->setSpacing( 4 ); 86 Layout11->setSpacing( 4 );
96 Layout11->setMargin( 0 ); 87 Layout11->setMargin( 0 );
97 88
98 stereoCheckBox = new QCheckBox( this, "stereoCheckBox" ); 89 stereoCheckBox = new QCheckBox( this, "stereoCheckBox" );
99 stereoCheckBox->setText( tr( "Stereo" ) ); 90 stereoCheckBox->setText( tr( "Stereo" ) );
100 Layout11->addWidget( stereoCheckBox ); 91 Layout11->addWidget( stereoCheckBox );
101 92
102 sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" ); 93 sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" );
103 sixteenBitCheckBox->setText( tr( "16 bit" ) ); 94 sixteenBitCheckBox->setText( tr( "16 bit" ) );
104 Layout11->addWidget( sixteenBitCheckBox ); 95 Layout11->addWidget( sixteenBitCheckBox );
105 96
106 AlertCheckBox = new QCheckBox( this, "AlertCheckBox" ); 97 AlertCheckBox = new QCheckBox( this, "AlertCheckBox" );
107 AlertCheckBox->setText( tr( "Visual Alerts" ) ); 98 AlertCheckBox->setText( tr( "Visual Alerts" ) );
108 Layout11->addWidget( AlertCheckBox ); 99 Layout11->addWidget( AlertCheckBox );
109 100
110 SoundSettingsBaseLayout->addLayout( Layout11, 0, 0); 101 SoundSettingsBaseLayout->addLayout( Layout11, 0, 0);
111 102
112 sampleRateLabel = new QLabel(this, "sampleRateLabel" ); 103 sampleRateLabel = new QLabel(this, "sampleRateLabel" );
113 sampleRateLabel->setText( tr( "Sample Rate:" ) ); 104 sampleRateLabel->setText( tr( "Sample Rate:" ) );
114 SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0, 1); 105 SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0, 1);
115 106
116 sampleRate = new QComboBox( FALSE,this, "sampleRate" ); 107 sampleRate = new QComboBox( FALSE,this, "sampleRate" );
117 108
118 sampleRate->insertItem( tr( "8000" ) ); 109 sampleRate->insertItem( tr( "8000" ) );
119 sampleRate->insertItem( tr( "11025" ) ); 110 sampleRate->insertItem( tr( "11025" ) );
120 sampleRate->insertItem( tr( "22050" ) ); 111 sampleRate->insertItem( tr( "22050" ) );
121 sampleRate->insertItem( tr( "33075" ) ); 112 sampleRate->insertItem( tr( "33075" ) );
122 sampleRate->insertItem( tr( "44100" ) ); 113 sampleRate->insertItem( tr( "44100" ) );
123 SoundSettingsBaseLayout->addMultiCellWidget( sampleRate, 2, 2, 0, 0, 1 ); 114 SoundSettingsBaseLayout->addMultiCellWidget( sampleRate, 2, 2, 0, 0, 1 );
124 115
125 TextLabel1 = new QLabel( this, "TextLabel1" ); 116 TextLabel1 = new QLabel( this, "TextLabel1" );
126 TextLabel1->setText( tr( "Recording Directory:" ) ); 117 TextLabel1->setText( tr( "Recording Directory:" ) );
127 SoundSettingsBaseLayout->addMultiCellWidget( TextLabel1, 3, 3, 0, 0, 1); 118 SoundSettingsBaseLayout->addMultiCellWidget( TextLabel1, 3, 3, 0, 0, 1);
128 119
129 120
130 LocationComboBox = new QComboBox( FALSE, this, "LocationComboBox" ); 121 LocationComboBox = new QComboBox( FALSE, this, "LocationComboBox" );
131 SoundSettingsBaseLayout->addMultiCellWidget( LocationComboBox, 4, 4, 0, 8, 1); 122 SoundSettingsBaseLayout->addMultiCellWidget( LocationComboBox, 4, 4, 0, 8, 1);
132 123
133 QLabel *TextLabelKey; 124 QLabel *TextLabelKey;
134 TextLabelKey = new QLabel( this, "TextLabelKey" ); 125 TextLabelKey = new QLabel( this, "TextLabelKey" );
135 TextLabelKey->setText( tr( "Recording Key:" ) ); 126 TextLabelKey->setText( tr( "Recording Key:" ) );
136 SoundSettingsBaseLayout->addMultiCellWidget(TextLabelKey , 5, 5, 0, 0, 1); 127 SoundSettingsBaseLayout->addMultiCellWidget(TextLabelKey , 5, 5, 0, 0, 1);
137 128
138 keyComboBox = new QComboBox( FALSE, this, "keyComboBox" ); 129 keyComboBox = new QComboBox( FALSE, this, "keyComboBox" );
139 keyComboBox->insertItem( tr( "" ) ); 130 keyComboBox->insertItem( tr( "" ) );
140 keyComboBox->insertItem( tr( "Taskbar Icon" ) ); 131 keyComboBox->insertItem( tr( "Taskbar Icon" ) );
141 keyComboBox->insertItem( tr( "Key_Record" ) ); 132 keyComboBox->insertItem( tr( "Key_Record" ) );
142 keyComboBox->insertItem( tr( "Key_Space" ) ); 133 keyComboBox->insertItem( tr( "Key_Space" ) );
143 keyComboBox->insertItem( tr( "Key_Home" ) ); 134 keyComboBox->insertItem( tr( "Key_Home" ) );
144 keyComboBox->insertItem( tr( "Key_Calender" ) ); 135 keyComboBox->insertItem( tr( "Key_Calender" ) );
145 keyComboBox->insertItem( tr( "Key_Contacts" ) ); 136 keyComboBox->insertItem( tr( "Key_Contacts" ) );
146 keyComboBox->insertItem( tr( "Key_Menu" ) ); 137 keyComboBox->insertItem( tr( "Key_Menu" ) );
147 keyComboBox->insertItem( tr( "Key_Mail" ) ); 138 keyComboBox->insertItem( tr( "Key_Mail" ) );
148 SoundSettingsBaseLayout->addMultiCellWidget( keyComboBox , 6, 6, 0, 0 ,1); 139 SoundSettingsBaseLayout->addMultiCellWidget( keyComboBox , 6, 6, 0, 0 ,1);
149 140
150 keyLabel= new QLabel( this, "keyLabel" ); 141 keyLabel= new QLabel( this, "keyLabel" );
151 SoundSettingsBaseLayout->addMultiCellWidget( keyLabel , 6, 6, 0, 2, 3); 142 SoundSettingsBaseLayout->addMultiCellWidget( keyLabel , 6, 6, 0, 2, 3);
152 143
153 QLabel *timeLimitLabel; 144 QLabel *timeLimitLabel;
154 timeLimitLabel= new QLabel( this, "timeLimitLabel" ); 145 timeLimitLabel= new QLabel( this, "timeLimitLabel" );
155 timeLimitLabel->setText( tr( "Recording Limit in seconds:" ) ); 146 timeLimitLabel->setText( tr( "Recording Limit in seconds:" ) );
156 SoundSettingsBaseLayout->addMultiCellWidget( timeLimitLabel , 7, 7, 0, 0, 1); 147 SoundSettingsBaseLayout->addMultiCellWidget( timeLimitLabel , 7, 7, 0, 0, 1);
157 148
158 timeLimitComboBox = new QComboBox( FALSE, this, "timeLimitComboBox" ); 149 timeLimitComboBox = new QComboBox( FALSE, this, "timeLimitComboBox" );
159 timeLimitComboBox->insertItem( tr( "30" ) ); 150 timeLimitComboBox->insertItem( tr( "30" ) );
160 timeLimitComboBox->insertItem( tr( "20" ) ); 151 timeLimitComboBox->insertItem( tr( "20" ) );
161 timeLimitComboBox->insertItem( tr( "15" ) ); 152 timeLimitComboBox->insertItem( tr( "15" ) );
162 timeLimitComboBox->insertItem( tr( "10" ) ); 153 timeLimitComboBox->insertItem( tr( "10" ) );
163 timeLimitComboBox->insertItem( tr( "5" ) ); 154 timeLimitComboBox->insertItem( tr( "5" ) );
164 timeLimitComboBox->insertItem( tr( "Unlimited" ) ); 155 timeLimitComboBox->insertItem( tr( "Unlimited" ) );
165 156
166 SoundSettingsBaseLayout->addMultiCellWidget(timeLimitComboBox , 8, 8, 0, 0, 1); 157 SoundSettingsBaseLayout->addMultiCellWidget(timeLimitComboBox , 8, 8, 0, 0, 1);
167 158
168 159
169 restartCheckBox= new QCheckBox( this, "restartCheck" ); 160 restartCheckBox= new QCheckBox( this, "restartCheck" );
170 restartCheckBox->setText( tr( "Restart Opie if needed" ) ); 161 restartCheckBox->setText( tr( "Restart Opie if needed" ) );
171 162
172 SoundSettingsBaseLayout->addMultiCellWidget( restartCheckBox , 9, 9, 0, 0, 1); 163 SoundSettingsBaseLayout->addMultiCellWidget( restartCheckBox , 9, 9, 0, 0, 1);
173 164
174 165
175 QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); 166 QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
176 SoundSettingsBaseLayout->addItem( spacer4, 9, 0 ); 167 SoundSettingsBaseLayout->addItem( spacer4, 9, 0 );
177} 168}
178 169
179/* 170/*
180 * Destroys the object and frees any allocated resources 171 * Destroys the object and frees any allocated resources
181 */ 172 */
182SoundSettingsBase::~SoundSettingsBase() 173SoundSettingsBase::~SoundSettingsBase()
183{ 174{
184 // no need to delete child widgets, Qt does it all for us 175 // no need to delete child widgets, Qt does it all for us
185} 176}