summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-08-29 23:28:09 (UTC)
committer llornkcor <llornkcor>2002-08-29 23:28:09 (UTC)
commitc4af3c78c9f6f073c1e0b11b331a2e24df80b9ff (patch) (unidiff)
treebf090bfc613bf84852b1a389877a8180af061595
parent598b2f4c404c2e12f59c2abc765f58bb8d0862a3 (diff)
downloadopie-c4af3c78c9f6f073c1e0b11b331a2e24df80b9ff.zip
opie-c4af3c78c9f6f073c1e0b11b331a2e24df80b9ff.tar.gz
opie-c4af3c78c9f6f073c1e0b11b331a2e24df80b9ff.tar.bz2
fix for opie restart. not a checkbox to activate restart on close of vmemo sound settings. does not remember, and default is to not restart
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sound/opie-sound.control10
-rw-r--r--noncore/settings/sound/soundsettings.cpp54
-rw-r--r--noncore/settings/sound/soundsettings.h6
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp10
-rw-r--r--noncore/settings/sound/soundsettingsbase.h2
5 files changed, 48 insertions, 34 deletions
diff --git a/noncore/settings/sound/opie-sound.control b/noncore/settings/sound/opie-sound.control
deleted file mode 100644
index 3d42ca0..0000000
--- a/noncore/settings/sound/opie-sound.control
+++ b/dev/null
@@ -1,10 +0,0 @@
1Files: bin/sound apps/Settings/Sound.desktop
2Priority: optional
3Section: opie/settings
4Maintainer: L.J. Potter
5Architecture: arm
6Arch: iPAQ
7Version: $QPE_VERSION-$SUB_VERSION.2
8Depends: opie-base ($QPE_VERSION)
9Description: Sound settings dialog
10 For the Opie environment.
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index 20f0dab..dd341c0 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -1,201 +1,211 @@
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> 29#include <qmessagebox.h>
30#include <qapplication.h> 30#include <qapplication.h>
31#include <qslider.h> 31#include <qslider.h>
32#include <qcheckbox.h> 32#include <qcheckbox.h>
33#include <qlineedit.h> 33#include <qlineedit.h>
34#include <qcombobox.h> 34#include <qcombobox.h>
35#include <qlabel.h>
35 36
36#include <sys/utsname.h> 37#include <sys/utsname.h>
37#include <sys/time.h> 38#include <sys/time.h>
38#include <sys/types.h> 39#include <sys/types.h>
39#include <unistd.h> 40#include <unistd.h>
40#include <stdio.h> 41#include <stdio.h>
41#include <sys/stat.h> 42#include <sys/stat.h>
42 43
44
43SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) 45SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
44 : SoundSettingsBase( parent, objname, TRUE, fl ) 46 : SoundSettingsBase( parent, objname, TRUE, fl )
45{ 47{
46 keyReset=FALSE; 48 keyReset=FALSE;
47 49 noWarning=false;
48 Config config( "qpe"); 50 Config config( "qpe");
49 config.setGroup( "Volume" ); 51 config.setGroup( "Volume" );
50 Config cfg("Vmemo"); 52 Config cfg("Vmemo");
51 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 53 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
52 AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); 54 AlertCheckBox->setChecked(cfg.readBoolEntry("Alert"));
53 55
54 cfg.setGroup("Record"); 56 cfg.setGroup("Record");
55 int rate=config.readNumEntry("SampleRate", 22050); 57 int rate=config.readNumEntry("SampleRate", 22050);
56 if(rate == 8000) 58 if(rate == 8000)
57 sampleRate->setCurrentItem(0); 59 sampleRate->setCurrentItem(0);
58 else if(rate == 11025) 60 else if(rate == 11025)
59 sampleRate->setCurrentItem(1); 61 sampleRate->setCurrentItem(1);
60 else if(rate == 22050) 62 else if(rate == 22050)
61 sampleRate->setCurrentItem(2); 63 sampleRate->setCurrentItem(2);
62 else if(rate == 33075) 64 else if(rate == 33075)
63 sampleRate->setCurrentItem(3); 65 sampleRate->setCurrentItem(3);
64 else if(rate==44100) 66 else if(rate==44100)
65 sampleRate->setCurrentItem(4); 67 sampleRate->setCurrentItem(4);
66 68
67 stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only 69 stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0));
70//TODO hide if zaurus- mono only
68 71
69#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) //since ipaq and zaurus have particular 72#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
70 //devices 73//since ipaq and zaurus have particular
74//devices
71 bool systemZaurus=FALSE; 75 bool systemZaurus=FALSE;
72 struct utsname name; /* check for embedix kernel running on the zaurus*/ 76 struct utsname name; /* check for embedix kernel running on the zaurus*/
73 if (uname(&name) != -1) {// TODO change this here,... 77 if (uname(&name) != -1) {// TODO change this here,...
74 QString release=name.release; 78 QString release=name.release;
75 if( release.find("embedix",0,TRUE) != -1) { 79 if( release.find("embedix",0,TRUE) != -1) {
76 qDebug("IS System Zaurus"); 80 qDebug("IS System Zaurus");
77 systemZaurus=TRUE; 81 systemZaurus=TRUE;
78 } 82 }
79 } 83 }
80 if(!systemZaurus) { 84 if(!systemZaurus) {
81 stereoCheckBox->setChecked(TRUE); 85 stereoCheckBox->setChecked(TRUE);
82 } 86 }
83 stereoCheckBox->setEnabled(FALSE); 87 stereoCheckBox->setEnabled(FALSE);
84 sixteenBitCheckBox->setEnabled(FALSE); 88 sixteenBitCheckBox->setEnabled(FALSE);
85#else 89#else
86#endif 90#endif
87 int sRate=cfg.readNumEntry("SizeLimit", 30); 91 int sRate=cfg.readNumEntry("SizeLimit", 30);
88 qDebug("%d",sRate); 92 qDebug("%d",sRate);
89 93
90 if(sRate ==30) 94 if(sRate ==30)
91 timeLimitComboBox->setCurrentItem(0); 95 timeLimitComboBox->setCurrentItem(0);
92 else if(sRate==20) 96 else if(sRate==20)
93 timeLimitComboBox->setCurrentItem(1); 97 timeLimitComboBox->setCurrentItem(1);
94 else if(sRate == 15) 98 else if(sRate == 15)
95 timeLimitComboBox->setCurrentItem(2); 99 timeLimitComboBox->setCurrentItem(2);
96 else if(sRate == 10) 100 else if(sRate == 10)
97 timeLimitComboBox->setCurrentItem(3); 101 timeLimitComboBox->setCurrentItem(3);
98 else if(sRate == 5) 102 else if(sRate == 5)
99 timeLimitComboBox->setCurrentItem(4); 103 timeLimitComboBox->setCurrentItem(4);
100 else 104 else
101 timeLimitComboBox->setCurrentItem(5); 105 timeLimitComboBox->setCurrentItem(5);
102 106
103 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); 107 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1));
104 108
105 cfg.setGroup("Defaults"); 109 cfg.setGroup("Defaults");
106 keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); 110 keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") );
107 111
108 updateStorageCombo(); 112 updateStorageCombo();
109 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); 113 connect( LocationComboBox,SIGNAL(activated(const QString &)), this,
110 connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT( setKeyButton(const QString &))); 114 SLOT( setLocation(const QString &)));
111 connect( timeLimitComboBox,SIGNAL(activated( const QString &)),this,SLOT( setSizeLimitButton(const QString &))); 115 connect( keyComboBox,SIGNAL(activated( int)), this,
116 SLOT( setKeyButton( int)));
117 connect( timeLimitComboBox,SIGNAL(activated( const QString &)), this,
118 SLOT( setSizeLimitButton(const QString &)));
119 connect( restartCheckBox,SIGNAL( toggled( bool)), this,
120 SLOT( restartOpie( bool)));
112// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 121// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
113} 122}
114 123
115void SoundSettings::updateStorageCombo() { 124void SoundSettings::updateStorageCombo() {
116 125
117 Config config( "Vmemo" ); 126 Config config( "Vmemo" );
118 config.setGroup( "System" ); 127 config.setGroup( "System" );
119 QString loc = config.readEntry("RecLocation","/"); 128 QString loc = config.readEntry("RecLocation","/");
120 int i=0; 129 int i=0;
121 int set=0; 130 int set=0;
122 StorageInfo storageInfo; 131 StorageInfo storageInfo;
123 QString sName, sPath; 132 QString sName, sPath;
124 QStringList list; 133 QStringList list;
125 list << "Documents : "+QPEApplication::documentDir(); 134 list << "Documents : "+QPEApplication::documentDir();
126 list << "tmp : /tmp"; 135 list << "tmp : /tmp";
127 136
128 const QList<FileSystem> &fs = storageInfo.fileSystems(); 137 const QList<FileSystem> &fs = storageInfo.fileSystems();
129 QListIterator<FileSystem> it ( fs ); 138 QListIterator<FileSystem> it ( fs );
130 for( ; it.current(); ++it ){ 139 for( ; it.current(); ++it ){
131 const QString name = (*it)->name(); 140 const QString name = (*it)->name();
132 const QString path = (*it)->path(); 141 const QString path = (*it)->path();
133 qDebug("storage name "+name +" storage path is "+path); 142 qDebug("storage name "+name +" storage path is "+path);
134 list << name + ": " +path; 143 list << name + ": " +path;
135 if( loc.find( path,0,TRUE) != -1) 144 if( loc.find( path,0,TRUE) != -1)
136 set = i; 145 set = i;
137// if(dit.current()->file().find(path) != -1 ) storage=name; 146// if(dit.current()->file().find(path) != -1 ) storage=name;
138 i++; 147 i++;
139 } 148 }
140 149
141 LocationComboBox->insertStringList(list); 150 LocationComboBox->insertStringList(list);
142 qDebug("set item %d", set); 151 qDebug("set item %d", set);
143 LocationComboBox->setCurrentItem(set); 152 LocationComboBox->setCurrentItem(set);
144} 153}
145 154
146void SoundSettings::setLocation(const QString & string) { 155void SoundSettings::setLocation(const QString & string) {
147 Config config( "Vmemo" ); 156 Config config( "Vmemo" );
148 config.setGroup( "System" ); 157 config.setGroup( "System" );
149 config.writeEntry("RecLocation",string); 158 config.writeEntry("RecLocation",string);
150 qDebug("set location "+string); 159 qDebug("set location "+string);
151 config.write(); 160 config.write();
152} 161}
153 162
154void SoundSettings::cleanUp() { 163void SoundSettings::cleanUp() {
155 Config cfg("Vmemo"); 164 Config cfg("Vmemo");
156 cfg.writeEntry("Alert",AlertCheckBox->isChecked()); 165 cfg.writeEntry("Alert",AlertCheckBox->isChecked());
157 166
158 cfg.setGroup("Record"); 167 cfg.setGroup("Record");
159 cfg.writeEntry("SampleRate",sampleRate->currentText()); 168 cfg.writeEntry("SampleRate",sampleRate->currentText());
160 cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); 169 cfg.writeEntry("Stereo",stereoCheckBox->isChecked());
161 cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); 170 cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
162 171
163 if(keyReset) { 172 if(keyReset && noWarning) {
164 switch ( QMessageBox::warning(this,tr("Restart"), 173 QCopEnvelope ("QPE/System", "restart()");
165 tr("To implement a new key switch\nOpie will have to be restarted./n<B>Restart</B> Opie now?"),
166 tr("Yes"),tr("No"),0,1,1) ) {
167 case 0:
168 QCopEnvelope ("QPE/System", "restart()");
169 break;
170 };
171 } 174 }
172} 175}
173 176
174void SoundSettings::setKeyButton(const QString &name) { 177void SoundSettings::setKeyButton( int index) {
175 Config cfg("Vmemo"); 178 Config cfg("Vmemo");
176 cfg.setGroup("Defaults"); 179 cfg.setGroup("Defaults");
177 cfg.writeEntry( "toggleKey", keyComboBox->currentItem() ); 180 cfg.writeEntry( "toggleKey", index );
178 keyReset = TRUE; 181 keyReset = TRUE;
179 if(keyComboBox->currentItem() == 1) 182 if( index == 1) {
180 cfg.writeEntry( "hideIcon", 0 ); 183 cfg.writeEntry( "hideIcon", 0 );
181 else 184 keyLabel->setText(tr("Shows icon"));
185 }
186 else {
182 cfg.writeEntry( "hideIcon", 1); 187 cfg.writeEntry( "hideIcon", 1);
183 188 keyLabel->setText(tr("Hides icon"));
184 189 }
185 cfg.write(); 190 cfg.write();
186} 191}
187 192
188void SoundSettings::updateLocationCombo() { 193void SoundSettings::updateLocationCombo() {
189 194
190} 195}
191 196
192void SoundSettings::setSizeLimitButton(const QString &index) { 197void SoundSettings::setSizeLimitButton(const QString &index) {
193 198
194 Config cfg("Vmemo"); 199 Config cfg("Vmemo");
195 cfg.setGroup("Record"); 200 cfg.setGroup("Record");
196 if(index.find("Unlimited",0,TRUE) != -1) 201 if(index.find("Unlimited",0,TRUE) != -1)
197 cfg.writeEntry("SizeLimit", -1); 202 cfg.writeEntry("SizeLimit", -1);
198 else 203 else
199 cfg.writeEntry("SizeLimit", index); 204 cfg.writeEntry("SizeLimit", index);
200 cfg.write(); 205 cfg.write();
201} 206}
207
208void SoundSettings::restartOpie(bool b) {
209 noWarning=b;
210}
211
diff --git a/noncore/settings/sound/soundsettings.h b/noncore/settings/sound/soundsettings.h
index 6b8b835..0f3605e 100644
--- a/noncore/settings/sound/soundsettings.h
+++ b/noncore/settings/sound/soundsettings.h
@@ -1,49 +1,51 @@
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
27class SoundSettings : public SoundSettingsBase 27class SoundSettings : public SoundSettingsBase
28{ 28{
29Q_OBJECT 29Q_OBJECT
30 30
31public: 31public:
32 SoundSettings( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 32 SoundSettings( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
33 33
34protected: 34protected:
35 bool noWarning;
35/* void accept(); */ 36/* void accept(); */
36/* void reject(); */ 37/* void reject(); */
37 void updateStorageCombo(); 38 void updateStorageCombo();
38 void updateLocationCombo(); 39 void updateLocationCombo();
39 40
40private slots: 41private slots:
41 void setKeyButton(const QString &); 42 void setKeyButton( int);
42 void setSizeLimitButton(const QString &); 43 void setSizeLimitButton(const QString &);
43 void setLocation(const QString &); 44 void setLocation(const QString &);
44 void cleanUp(); 45 void cleanUp();
46 void restartOpie(bool);
45}; 47};
46 48
47 49
48#endif // SOUNDSETTINGS_H 50#endif // SOUNDSETTINGS_H
49 51
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp
index 05b4b7e..1a60109 100644
--- a/noncore/settings/sound/soundsettingsbase.cpp
+++ b/noncore/settings/sound/soundsettingsbase.cpp
@@ -102,74 +102,84 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
102 sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" ); 102 sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" );
103 sixteenBitCheckBox->setText( tr( "16 bit" ) ); 103 sixteenBitCheckBox->setText( tr( "16 bit" ) );
104 Layout11->addWidget( sixteenBitCheckBox ); 104 Layout11->addWidget( sixteenBitCheckBox );
105 105
106 AlertCheckBox = new QCheckBox( this, "AlertCheckBox" ); 106 AlertCheckBox = new QCheckBox( this, "AlertCheckBox" );
107 AlertCheckBox->setText( tr( "Visual Alerts" ) ); 107 AlertCheckBox->setText( tr( "Visual Alerts" ) );
108 Layout11->addWidget( AlertCheckBox ); 108 Layout11->addWidget( AlertCheckBox );
109 109
110 SoundSettingsBaseLayout->addLayout( Layout11, 0, 0); 110 SoundSettingsBaseLayout->addLayout( Layout11, 0, 0);
111 111
112 sampleRateLabel = new QLabel(this, "sampleRateLabel" ); 112 sampleRateLabel = new QLabel(this, "sampleRateLabel" );
113 sampleRateLabel->setText( tr( "Sample Rate:" ) ); 113 sampleRateLabel->setText( tr( "Sample Rate:" ) );
114 SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0, 1); 114 SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0, 1);
115 115
116 sampleRate = new QComboBox( FALSE,this, "sampleRate" ); 116 sampleRate = new QComboBox( FALSE,this, "sampleRate" );
117 117
118 sampleRate->insertItem( tr( "8000" ) ); 118 sampleRate->insertItem( tr( "8000" ) );
119 sampleRate->insertItem( tr( "11025" ) ); 119 sampleRate->insertItem( tr( "11025" ) );
120 sampleRate->insertItem( tr( "22050" ) ); 120 sampleRate->insertItem( tr( "22050" ) );
121 sampleRate->insertItem( tr( "33075" ) ); 121 sampleRate->insertItem( tr( "33075" ) );
122 sampleRate->insertItem( tr( "44100" ) ); 122 sampleRate->insertItem( tr( "44100" ) );
123 SoundSettingsBaseLayout->addMultiCellWidget( sampleRate, 2, 2, 0, 0, 1 ); 123 SoundSettingsBaseLayout->addMultiCellWidget( sampleRate, 2, 2, 0, 0, 1 );
124 124
125 TextLabel1 = new QLabel( this, "TextLabel1" ); 125 TextLabel1 = new QLabel( this, "TextLabel1" );
126 TextLabel1->setText( tr( "Recording Directory:" ) ); 126 TextLabel1->setText( tr( "Recording Directory:" ) );
127 SoundSettingsBaseLayout->addMultiCellWidget( TextLabel1, 3, 3, 0, 0, 1); 127 SoundSettingsBaseLayout->addMultiCellWidget( TextLabel1, 3, 3, 0, 0, 1);
128 128
129 129
130 LocationComboBox = new QComboBox( FALSE, this, "LocationComboBox" ); 130 LocationComboBox = new QComboBox( FALSE, this, "LocationComboBox" );
131 SoundSettingsBaseLayout->addMultiCellWidget( LocationComboBox, 4, 4, 0, 8, 1); 131 SoundSettingsBaseLayout->addMultiCellWidget( LocationComboBox, 4, 4, 0, 8, 1);
132 132
133 QLabel *TextLabelKey; 133 QLabel *TextLabelKey;
134 TextLabelKey = new QLabel( this, "TextLabelKey" ); 134 TextLabelKey = new QLabel( this, "TextLabelKey" );
135 TextLabelKey->setText( tr( "Recording Key:" ) ); 135 TextLabelKey->setText( tr( "Recording Key:" ) );
136 SoundSettingsBaseLayout->addMultiCellWidget(TextLabelKey , 5, 5, 0, 0, 1); 136 SoundSettingsBaseLayout->addMultiCellWidget(TextLabelKey , 5, 5, 0, 0, 1);
137 137
138 keyComboBox = new QComboBox( FALSE, this, "keyComboBox" ); 138 keyComboBox = new QComboBox( FALSE, this, "keyComboBox" );
139 keyComboBox->insertItem( tr( "" ) ); 139 keyComboBox->insertItem( tr( "" ) );
140 keyComboBox->insertItem( tr( "Taskbar Icon" ) ); 140 keyComboBox->insertItem( tr( "Taskbar Icon" ) );
141 keyComboBox->insertItem( tr( "Key_Escape" ) ); 141 keyComboBox->insertItem( tr( "Key_Escape" ) );
142 keyComboBox->insertItem( tr( "Key_Space" ) ); 142 keyComboBox->insertItem( tr( "Key_Space" ) );
143 keyComboBox->insertItem( tr( "Key_Home" ) ); 143 keyComboBox->insertItem( tr( "Key_Home" ) );
144 keyComboBox->insertItem( tr( "Key_Calender" ) ); 144 keyComboBox->insertItem( tr( "Key_Calender" ) );
145 keyComboBox->insertItem( tr( "Key_Contacts" ) ); 145 keyComboBox->insertItem( tr( "Key_Contacts" ) );
146 keyComboBox->insertItem( tr( "Key_Menu" ) ); 146 keyComboBox->insertItem( tr( "Key_Menu" ) );
147 keyComboBox->insertItem( tr( "Key_Mail" ) ); 147 keyComboBox->insertItem( tr( "Key_Mail" ) );
148 SoundSettingsBaseLayout->addMultiCellWidget( keyComboBox , 6, 6, 0, 0 ,1); 148 SoundSettingsBaseLayout->addMultiCellWidget( keyComboBox , 6, 6, 0, 0 ,1);
149 149
150 keyLabel= new QLabel( this, "keyLabel" );
151 SoundSettingsBaseLayout->addMultiCellWidget( keyLabel , 6, 6, 0, 2, 3);
152
150 QLabel *timeLimitLabel; 153 QLabel *timeLimitLabel;
151 timeLimitLabel= new QLabel( this, "timeLimitLabel" ); 154 timeLimitLabel= new QLabel( this, "timeLimitLabel" );
152 timeLimitLabel->setText( tr( "Recording Limit in seconds:" ) ); 155 timeLimitLabel->setText( tr( "Recording Limit in seconds:" ) );
153 SoundSettingsBaseLayout->addMultiCellWidget( timeLimitLabel , 7, 7, 0, 0, 1); 156 SoundSettingsBaseLayout->addMultiCellWidget( timeLimitLabel , 7, 7, 0, 0, 1);
154 157
155 timeLimitComboBox = new QComboBox( FALSE, this, "timeLimitComboBox" ); 158 timeLimitComboBox = new QComboBox( FALSE, this, "timeLimitComboBox" );
156 timeLimitComboBox->insertItem( tr( "30" ) ); 159 timeLimitComboBox->insertItem( tr( "30" ) );
157 timeLimitComboBox->insertItem( tr( "20" ) ); 160 timeLimitComboBox->insertItem( tr( "20" ) );
158 timeLimitComboBox->insertItem( tr( "15" ) ); 161 timeLimitComboBox->insertItem( tr( "15" ) );
159 timeLimitComboBox->insertItem( tr( "10" ) ); 162 timeLimitComboBox->insertItem( tr( "10" ) );
160 timeLimitComboBox->insertItem( tr( "5" ) ); 163 timeLimitComboBox->insertItem( tr( "5" ) );
161 timeLimitComboBox->insertItem( tr( "Unlimited" ) ); 164 timeLimitComboBox->insertItem( tr( "Unlimited" ) );
162 165
163 SoundSettingsBaseLayout->addMultiCellWidget(timeLimitComboBox , 8, 8, 0, 0, 1); 166 SoundSettingsBaseLayout->addMultiCellWidget(timeLimitComboBox , 8, 8, 0, 0, 1);
164 167
168
169 restartCheckBox= new QCheckBox( this, "restartCheck" );
170 restartCheckBox->setText( tr( "Restart Opie if needed" ) );
171
172 SoundSettingsBaseLayout->addMultiCellWidget( restartCheckBox , 9, 9, 0, 0, 1);
173
174
165 QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); 175 QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
166 SoundSettingsBaseLayout->addItem( spacer4, 9, 0 ); 176 SoundSettingsBaseLayout->addItem( spacer4, 9, 0 );
167} 177}
168 178
169/* 179/*
170 * Destroys the object and frees any allocated resources 180 * Destroys the object and frees any allocated resources
171 */ 181 */
172SoundSettingsBase::~SoundSettingsBase() 182SoundSettingsBase::~SoundSettingsBase()
173{ 183{
174 // no need to delete child widgets, Qt does it all for us 184 // no need to delete child widgets, Qt does it all for us
175} 185}
diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h
index 30f32ca..e6bc186 100644
--- a/noncore/settings/sound/soundsettingsbase.h
+++ b/noncore/settings/sound/soundsettingsbase.h
@@ -1,58 +1,60 @@
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
16class QVBoxLayout; 16class QVBoxLayout;
17class QHBoxLayout; 17class QHBoxLayout;
18class QGridLayout; 18class QGridLayout;
19class QCheckBox; 19class QCheckBox;
20class QComboBox; 20class QComboBox;
21class QGroupBox; 21class QGroupBox;
22class QLabel; 22class QLabel;
23class QSlider; 23class QSlider;
24 24
25class SoundSettingsBase : public QMainWindow 25class SoundSettingsBase : public QMainWindow
26{ 26{
27 Q_OBJECT 27 Q_OBJECT
28 28
29public: 29public:
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 QLabel* PixmapLabel1_2; 33 QLabel* PixmapLabel1_2;
34 QLabel* TextLabel1_2; 34 QLabel* TextLabel1_2;
35 QLabel *keyLabel;
35/* QLabel* volLabel; */ 36/* QLabel* volLabel; */
36/* QLabel* micLabel; */ 37/* QLabel* micLabel; */
37/* QSlider* volume; */ 38/* QSlider* volume; */
38/* QSlider* mic; */ 39/* QSlider* mic; */
39/* QLabel* PixmapLabel2_2; */ 40/* QLabel* PixmapLabel2_2; */
40/* QLabel* TextLabel2_2; */ 41/* QLabel* TextLabel2_2; */
41/* QGroupBox* GroupBox1; */ 42/* QGroupBox* GroupBox1; */
42 QLabel* sampleRateLabel; 43 QLabel* sampleRateLabel;
43 QComboBox* sampleRate; 44 QComboBox* sampleRate;
44 QCheckBox* stereoCheckBox; 45 QCheckBox* stereoCheckBox;
45 QCheckBox* sixteenBitCheckBox; 46 QCheckBox* sixteenBitCheckBox;
46 QCheckBox* AlertCheckBox; 47 QCheckBox* AlertCheckBox;
47 QLabel* TextLabel1; 48 QLabel* TextLabel1;
48 QComboBox* LocationComboBox; 49 QComboBox* LocationComboBox;
49 QComboBox* keyComboBox; 50 QComboBox* keyComboBox;
50 QComboBox* timeLimitComboBox; 51 QComboBox* timeLimitComboBox;
52 QCheckBox *restartCheckBox;
51 bool keyReset; 53 bool keyReset;
52protected: 54protected:
53 QGridLayout* SoundSettingsBaseLayout; 55 QGridLayout* SoundSettingsBaseLayout;
54protected slots: 56protected slots:
55 57
56}; 58};
57 59
58#endif // SOUNDSETTINGSBASE_H 60#endif // SOUNDSETTINGSBASE_H