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