summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp121
-rw-r--r--noncore/settings/sound/soundsettings.h6
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp3
-rw-r--r--noncore/settings/sound/soundsettingsbase.h8
4 files changed, 82 insertions, 56 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index ed601cf..40b8b87 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -1,177 +1,200 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "soundsettings.h" 21#include "soundsettings.h"
22 22
23#include <qpe/qpeapplication.h>
23#include <qpe/config.h> 24#include <qpe/config.h>
24#include <qpe/qcopenvelope_qws.h> 25#include <qpe/qcopenvelope_qws.h>
25#include <qpe/storage.h> 26#include <qpe/storage.h>
26 27
27#include <qapplication.h> 28#include <qapplication.h>
28#include <qslider.h> 29#include <qslider.h>
29#include <qcheckbox.h> 30#include <qcheckbox.h>
30#include <qlineedit.h> 31#include <qlineedit.h>
31#include <qcombobox.h> 32#include <qcombobox.h>
32 33
33 34
34SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl ) 35SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
35 : SoundSettingsBase( parent, name, TRUE, fl ) 36 : SoundSettingsBase( parent, name, TRUE, fl )
36{ 37{
37 Config config( "qpe"); 38 Config config( "qpe");
38 config.setGroup( "Volume" ); 39 config.setGroup( "Volume" );
39 volume->setValue(100-config.readNumEntry("VolumePercent")); 40 volume->setValue(100-config.readNumEntry("VolumePercent"));
40 mic->setValue(100-config.readNumEntry("Mic")); 41 mic->setValue(100-config.readNumEntry("Mic"));
41// touchsound->setChecked(config.readBoolEntry("TouchSound")); 42// touchsound->setChecked(config.readBoolEntry("TouchSound"));
42// keysound->setChecked(config.readBoolEntry("KeySound")); 43// keysound->setChecked(config.readBoolEntry("KeySound"));
43 Config cfg("Vmemo"); 44 Config cfg("Vmemo");
45 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
44 AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); 46 AlertCheckBox->setChecked(cfg.readBoolEntry("Alert"));
45 47
46 cfg.setGroup("Record"); 48 cfg.setGroup("Record");
47 int rate=config.readNumEntry("SampleRate", 22050); 49 int rate=config.readNumEntry("SampleRate", 22050);
48 if(rate == 8000) 50 if(rate == 8000)
49 sampleRate->setCurrentItem(0); 51 sampleRate->setCurrentItem(0);
50 else if(rate == 11025) 52 else if(rate == 11025)
51 sampleRate->setCurrentItem(1); 53 sampleRate->setCurrentItem(1);
52 else if(rate == 22050) 54 else if(rate == 22050)
53 sampleRate->setCurrentItem(2); 55 sampleRate->setCurrentItem(2);
54 else if(rate == 33075) 56 else if(rate == 33075)
55 sampleRate->setCurrentItem(3); 57 sampleRate->setCurrentItem(3);
56 else if(rate==44100) 58 else if(rate==44100)
57 sampleRate->setCurrentItem(4); 59 sampleRate->setCurrentItem(4);
58 60
59 stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); 61 stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0));
60 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); 62 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1));
61 63
62 updateStorageCombo(); 64 updateStorageCombo();
63 connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); 65 connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int)));
64 connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int))); 66 connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int)));
65 connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) ); 67 connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) );
66 connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) ); 68 connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) );
67 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); 69 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &)));
68// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 70// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
69} 71}
70 72
71void SoundSettings::reject() 73// void SoundSettings::reject()
72{ 74// {
73 qDebug("here"); 75// qDebug("reject");
74 Config config( "qpe"); 76// Config config( "qpe");
75 config.setGroup( "Volume"); 77// config.setGroup( "Volume");
76 78
77 setVolume(100-config.readNumEntry("VolumePercent")); 79// setVolume(100-config.readNumEntry("VolumePercent"));
78 setMic(100-config.readNumEntry("Mic")); 80// setMic(100-config.readNumEntry("Mic"));
79 81
80// config.setGroup("Record"); 82// // config.setGroup("Record");
81// int rate=config.readNumEntry("SampleRate", 11025); 83// // int rate=config.readNumEntry("SampleRate", 11025);
82// if(rate == 11025) 84// // if(rate == 11025)
83// sampleRate->setCurrentItem(0); 85// // sampleRate->setCurrentItem(0);
84// else if(rate == 22050) 86// // else if(rate == 22050)
85// sampleRate->setCurrentItem(1); 87// // sampleRate->setCurrentItem(1);
86// else if(rate == 32000) 88// // else if(rate == 32000)
87// sampleRate->setCurrentItem(2); 89// // sampleRate->setCurrentItem(2);
88// else if(rate==44100) 90// // else if(rate==44100)
89// sampleRate->setCurrentItem(3); 91// // sampleRate->setCurrentItem(3);
90// stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0)); 92// // stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0));
91// sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0)); 93// // sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0));
92 ::exit(-1); 94// qDebug("QDialog::reject();");
93// QDialog::reject(); 95// ::exit(-1);
94} 96// }
95 97
96void SoundSettings::accept() 98// void SoundSettings::accept()
97{ 99// {
98 Config config( "qpe" ); 100// qDebug("accept");
99 config.setGroup( "Volume" ); 101// Config config( "qpe" );
100 config.writeEntry("VolumePercent",100-volume->value()); 102// config.setGroup( "Volume" );
101 config.writeEntry("Mic",100-mic->value()); 103// config.writeEntry("VolumePercent",100-volume->value());
102// config.writeEntry("TouchSound",touchsound->isChecked()); 104// config.writeEntry("Mic",100-mic->value());
103// config.writeEntry("KeySound",keysound->isChecked()); 105// // config.writeEntry("TouchSound",touchsound->isChecked());
104 106// // config.writeEntry("KeySound",keysound->isChecked());
105 Config cfg("Vmemo"); 107
106 cfg.writeEntry("Alert",AlertCheckBox->isChecked()); 108// Config cfg("Vmemo");
107 setVolume(volume->value()); 109// cfg.writeEntry("Alert",AlertCheckBox->isChecked());
108 setMic(mic->value()); 110// setVolume(volume->value());
109 111// setMic(mic->value());
110 cfg.setGroup("Record"); 112
111 cfg.writeEntry("SampleRate",sampleRate->currentText()); 113// cfg.setGroup("Record");
112 cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); 114// cfg.writeEntry("SampleRate",sampleRate->currentText());
113 cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); 115// cfg.writeEntry("Stereo",stereoCheckBox->isChecked());
114// Config cfg( "VMemo" ); 116// cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
115// cfg.setGroup( "Defaults" ); 117// // Config cfg( "VMemo" );
116// cfg.writeEntry( "hideIcon", HideIcon_CheckBox->isChecked()); 118// // cfg.setGroup( "Defaults" );
117// QDialog::accept(); 119// // cfg.writeEntry( "hideIcon", HideIcon_CheckBox->isChecked());
118 ::exit(0); 120// qDebug("QDialog::accept();");
119} 121// ::exit(0);
122// }
120 123
121void SoundSettings::setVolume(int v) 124void SoundSettings::setVolume(int v)
122{ 125{
123 Config config( "qpe" ); 126 Config config( "qpe" );
124 config.setGroup( "Volume" ); 127 config.setGroup( "Volume" );
125 config.writeEntry("VolumePercent",100-v); 128 config.writeEntry("VolumePercent",100-v);
126#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) 129#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
127 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE; 130 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
128#endif 131#endif
129} 132}
130 133
131void SoundSettings::setMic(int m) 134void SoundSettings::setMic(int m)
132{ 135{
133 Config config( "qpe" ); 136 Config config( "qpe" );
134 config.setGroup( "Volume" ); 137 config.setGroup( "Volume" );
135 config.writeEntry("Mic",100-m); 138 config.writeEntry("Mic",100-m);
136#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) 139#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
137 QCopEnvelope( "QPE/System", "micChange(bool)" ) << FALSE; 140 QCopEnvelope( "QPE/System", "micChange(bool)" ) << FALSE;
138#endif 141#endif
139} 142}
140 143
141void SoundSettings::volumeChanged( bool ) 144void SoundSettings::volumeChanged( bool )
142{ 145{
143 Config config( "qpe" ); 146 Config config( "qpe" );
144 config.setGroup( "Volume" ); 147 config.setGroup( "Volume" );
145 volume->setValue(100-config.readNumEntry("VolumePercent")); 148 volume->setValue(100-config.readNumEntry("VolumePercent"));
146} 149}
147 150
148void SoundSettings::micChanged( bool ) 151void SoundSettings::micChanged( bool )
149{ 152{
150 Config config( "qpe" ); 153 Config config( "qpe" );
151 config.setGroup( "Volume" ); 154 config.setGroup( "Volume" );
152 mic->setValue(100-config.readNumEntry("Mic")); 155 mic->setValue(100-config.readNumEntry("Mic"));
153} 156}
154 157
155void SoundSettings::updateStorageCombo() { 158void SoundSettings::updateStorageCombo() {
156 159
157 StorageInfo storageInfo; 160 StorageInfo storageInfo;
158 QString sName, sPath; 161 QString sName, sPath;
159 QStringList list; 162 QStringList list;
160 const QList<FileSystem> &fs = storageInfo.fileSystems(); 163 const QList<FileSystem> &fs = storageInfo.fileSystems();
161 QListIterator<FileSystem> it ( fs ); 164 QListIterator<FileSystem> it ( fs );
162 for( ; it.current(); ++it ){ 165 for( ; it.current(); ++it ){
163 const QString name = (*it)->name(); 166 const QString name = (*it)->name();
164 const QString path = (*it)->path(); 167 const QString path = (*it)->path();
165 qDebug("storage name "+name +" storage path is "+path); 168 qDebug("storage name "+name +" storage path is "+path);
166 list << name + ": " +path; 169 list << name + ": " +path;
167// if(dit.current()->file().find(path) != -1 ) storage=name; 170// if(dit.current()->file().find(path) != -1 ) storage=name;
168 } 171 }
169 LocationComboBox->insertStringList(list); 172 LocationComboBox->insertStringList(list);
170} 173}
171 174
172void SoundSettings::setLocation(const QString & string) { 175void SoundSettings::setLocation(const QString & string) {
173 Config config( "Vmemo" ); 176 Config config( "Vmemo" );
174 config.setGroup( "System" ); 177 config.setGroup( "System" );
175 config.writeEntry("RecLocation",string); 178 config.writeEntry("RecLocation",string);
176 179
177} 180}
181
182void SoundSettings::cleanUp() {
183 qDebug("cleanup");
184 Config config( "qpe" );
185 config.setGroup( "Volume" );
186 config.writeEntry("VolumePercent",100-volume->value());
187 config.writeEntry("Mic",100-mic->value());
188// config.writeEntry("TouchSound",touchsound->isChecked());
189// config.writeEntry("KeySound",keysound->isChecked());
190
191 Config cfg("Vmemo");
192 cfg.writeEntry("Alert",AlertCheckBox->isChecked());
193 setVolume(volume->value());
194 setMic(mic->value());
195
196 cfg.setGroup("Record");
197 cfg.writeEntry("SampleRate",sampleRate->currentText());
198 cfg.writeEntry("Stereo",stereoCheckBox->isChecked());
199 cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
200}
diff --git a/noncore/settings/sound/soundsettings.h b/noncore/settings/sound/soundsettings.h
index aec7614..cbec724 100644
--- a/noncore/settings/sound/soundsettings.h
+++ b/noncore/settings/sound/soundsettings.h
@@ -1,51 +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 void accept(); 35/* void accept(); */
36 void reject(); 36/* void reject(); */
37 void updateStorageCombo(); 37 void updateStorageCombo();
38 38
39private slots: 39private slots:
40 void setLocation(const QString &); 40 void setLocation(const QString &);
41 41 void cleanUp();
42 void setVolume(int); 42 void setVolume(int);
43 void setMic(int); 43 void setMic(int);
44 44
45 void volumeChanged( bool muted ); 45 void volumeChanged( bool muted );
46 void micChanged( bool muted ); 46 void micChanged( bool muted );
47}; 47};
48 48
49 49
50#endif // SOUNDSETTINGS_H 50#endif // SOUNDSETTINGS_H
51 51
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp
index f86db78..727d202 100644
--- a/noncore/settings/sound/soundsettingsbase.cpp
+++ b/noncore/settings/sound/soundsettingsbase.cpp
@@ -1,254 +1,255 @@
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> 13#include <qgroupbox.h>
14#include <qmainwindow.h> 14#include <qmainwindow.h>
15 15
16#include <qpe/qpeapplication.h>
16#include <qlabel.h> 17#include <qlabel.h>
17#include <qpushbutton.h> 18#include <qpushbutton.h>
18#include <qslider.h> 19#include <qslider.h>
19#include <qlayout.h> 20#include <qlayout.h>
20#include <qvariant.h> 21#include <qvariant.h>
21#include <qtooltip.h> 22#include <qtooltip.h>
22#include <qwhatsthis.h> 23#include <qwhatsthis.h>
23#include <qimage.h> 24#include <qimage.h>
24#include <qpixmap.h> 25#include <qpixmap.h>
25 26
26static const char* const image0_data[] = { 27static const char* const image0_data[] = {
27"16 16 3 1", 28"16 16 3 1",
28". c None", 29". c None",
29"a c #000000", 30"a c #000000",
30"# c #ff0000", 31"# c #ff0000",
31"............#...", 32"............#...",
32"............##..", 33"............##..",
33"..........#..#..", 34"..........#..#..",
34".....a..#..#.#..", 35".....a..#..#.#..",
35"....aa..##.#..#.", 36"....aa..##.#..#.",
36"...aaa...#.##.#.", 37"...aaa...#.##.#.",
37"aaaaaa.#.#..#.##", 38"aaaaaa.#.#..#.##",
38"aaaaaa.#.##.#.##", 39"aaaaaa.#.##.#.##",
39"aaaaaa.#.##.#.##", 40"aaaaaa.#.##.#.##",
40"aaaaaa.#.##.#.##", 41"aaaaaa.#.##.#.##",
41"aaaaaa.#.#..#.##", 42"aaaaaa.#.#..#.##",
42"...aaa...#.##.#.", 43"...aaa...#.##.#.",
43"....aa..#..#..#.", 44"....aa..#..#..#.",
44".....a.....#.##.", 45".....a.....#.##.",
45"..........#..#..", 46"..........#..#..",
46"............##.."}; 47"............##.."};
47 48
48static const char* const image1_data[] = { 49static const char* const image1_data[] = {
49"16 16 3 1", 50"16 16 3 1",
50". c None", 51". c None",
51"# c #000000", 52"# c #000000",
52"a c #ff0000", 53"a c #ff0000",
53"................", 54"................",
54"................", 55"................",
55"................", 56"................",
56".....#..........", 57".....#..........",
57"....##..........", 58"....##..........",
58"...###...a...a..", 59"...###...a...a..",
59"######..aaa.aaa.", 60"######..aaa.aaa.",
60"######...aaaaa..", 61"######...aaaaa..",
61"######....aaa...", 62"######....aaa...",
62"######...aaaaa..", 63"######...aaaaa..",
63"######..aaa.aaa.", 64"######..aaa.aaa.",
64"...###...a...a..", 65"...###...a...a..",
65"....##..........", 66"....##..........",
66".....#..........", 67".....#..........",
67"................", 68"................",
68"................"}; 69"................"};
69 70
70 71
71/* 72/*
72 * Constructs a SoundSettingsBase which is a child of 'parent', with the 73 * Constructs a SoundSettingsBase which is a child of 'parent', with the
73 * name 'name' and widget flags set to 'f' 74 * name 'name' and widget flags set to 'f'
74 * 75 *
75 * The dialog will by default be modeless, unless you set 'modal' to 76 * The dialog will by default be modeless, unless you set 'modal' to
76 * TRUE to construct a modal dialog. 77 * TRUE to construct a modal dialog.
77 */ 78 */
78SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl ) 79SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl )
79 : QMainWindow( parent, name, fl ) 80 : QMainWindow( parent, name, fl )
80{ 81{
81 QPixmap image0( ( const char** ) image0_data ); 82 QPixmap image0( ( const char** ) image0_data );
82 QPixmap image1( ( const char** ) image1_data ); 83 QPixmap image1( ( const char** ) image1_data );
83 if ( !name ) 84 if ( !name )
84 setName( "SoundSettingsBase" ); 85 setName( "SoundSettingsBase" );
85 resize( 255, 301 ); 86 resize( 255, 301 );
86 setCaption( tr( "Vmemo Settings" ) ); 87 setCaption( tr( "Vmemo Settings" ) );
88
87 SoundSettingsBaseLayout = new QGridLayout( this ); 89 SoundSettingsBaseLayout = new QGridLayout( this );
88 SoundSettingsBaseLayout->setSpacing( 6 ); 90 SoundSettingsBaseLayout->setSpacing( 6 );
89 SoundSettingsBaseLayout->setMargin( 11 ); 91 SoundSettingsBaseLayout->setMargin( 11 );
90 92
91 GroupBox3 = new QGroupBox( this, "GroupBox3" ); 93 GroupBox3 = new QGroupBox( this, "GroupBox3" );
92 GroupBox3->setFrameShape( QGroupBox::Box ); 94 GroupBox3->setFrameShape( QGroupBox::Box );
93 GroupBox3->setFrameShadow( QGroupBox::Sunken ); 95 GroupBox3->setFrameShadow( QGroupBox::Sunken );
94 GroupBox3->setTitle( tr( "Levels" ) ); 96 GroupBox3->setTitle( tr( "Levels" ) );
95 GroupBox3->setColumnLayout(0, Qt::Vertical ); 97 GroupBox3->setColumnLayout(0, Qt::Vertical );
96 GroupBox3->layout()->setSpacing( 0 ); 98 GroupBox3->layout()->setSpacing( 0 );
97 GroupBox3->layout()->setMargin( 0 ); 99 GroupBox3->layout()->setMargin( 0 );
98 GroupBox3Layout = new QVBoxLayout( GroupBox3->layout() ); 100 GroupBox3Layout = new QVBoxLayout( GroupBox3->layout() );
99 GroupBox3Layout->setAlignment( Qt::AlignTop ); 101 GroupBox3Layout->setAlignment( Qt::AlignTop );
100 GroupBox3Layout->setSpacing( 2 ); 102 GroupBox3Layout->setSpacing( 2 );
101 GroupBox3Layout->setMargin( 2 ); 103 GroupBox3Layout->setMargin( 2 );
102 104
103 Layout10 = new QVBoxLayout; 105 Layout10 = new QVBoxLayout;
104 Layout10->setSpacing( 2 ); 106 Layout10->setSpacing( 2 );
105 Layout10->setMargin( 2 ); 107 Layout10->setMargin( 2 );
106 108
107 Layout16 = new QHBoxLayout; 109 Layout16 = new QHBoxLayout;
108 Layout16->setSpacing( 2 ); 110 Layout16->setSpacing( 2 );
109 Layout16->setMargin( 2 ); 111 Layout16->setMargin( 2 );
110 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 112 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
111 Layout16->addItem( spacer ); 113 Layout16->addItem( spacer );
112 114
113 PixmapLabel1_2 = new QLabel( GroupBox3, "PixmapLabel1_2" ); 115 PixmapLabel1_2 = new QLabel( GroupBox3, "PixmapLabel1_2" );
114 PixmapLabel1_2->setPixmap( image0 ); 116 PixmapLabel1_2->setPixmap( image0 );
115 PixmapLabel1_2->setScaledContents( FALSE ); 117 PixmapLabel1_2->setScaledContents( FALSE );
116 Layout16->addWidget( PixmapLabel1_2 ); 118 Layout16->addWidget( PixmapLabel1_2 );
117 119
118 TextLabel1_2 = new QLabel( GroupBox3, "TextLabel1_2" ); 120 TextLabel1_2 = new QLabel( GroupBox3, "TextLabel1_2" );
119 TextLabel1_2->setText( tr( "Loud" ) ); 121 TextLabel1_2->setText( tr( "Loud" ) );
120 Layout16->addWidget( TextLabel1_2 ); 122 Layout16->addWidget( TextLabel1_2 );
121 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 123 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
122 Layout16->addItem( spacer_2 ); 124 Layout16->addItem( spacer_2 );
123 Layout10->addLayout( Layout16 ); 125 Layout10->addLayout( Layout16 );
124 126
125 Layout13 = new QHBoxLayout; 127 Layout13 = new QHBoxLayout;
126 Layout13->setSpacing( 2 ); 128 Layout13->setSpacing( 2 );
127 Layout13->setMargin( 2 ); 129 Layout13->setMargin( 2 );
128 130
129 volLabel = new QLabel( GroupBox3, "volLabel" ); 131 volLabel = new QLabel( GroupBox3, "volLabel" );
130 volLabel->setText( tr( "Output" ) ); 132 volLabel->setText( tr( "Output" ) );
131 Layout13->addWidget( volLabel ); 133 Layout13->addWidget( volLabel );
132 QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 134 QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
133 Layout13->addItem( spacer_3 ); 135 Layout13->addItem( spacer_3 );
134 136
135 micLabel = new QLabel( GroupBox3, "micLabel" ); 137 micLabel = new QLabel( GroupBox3, "micLabel" );
136 micLabel->setText( tr( "Mic" ) ); 138 micLabel->setText( tr( "Mic" ) );
137 Layout13->addWidget( micLabel ); 139 Layout13->addWidget( micLabel );
138 QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 140 QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
139 Layout13->addItem( spacer_4 ); 141 Layout13->addItem( spacer_4 );
140 Layout10->addLayout( Layout13 ); 142 Layout10->addLayout( Layout13 );
141 143
142 Layout12 = new QHBoxLayout; 144 Layout12 = new QHBoxLayout;
143 Layout12->setSpacing( 2 ); 145 Layout12->setSpacing( 2 );
144 Layout12->setMargin( 2 ); 146 Layout12->setMargin( 2 );
145 147
146 volume = new QSlider( GroupBox3, "volume" ); 148 volume = new QSlider( GroupBox3, "volume" );
147 volume->setMaxValue( 100 ); 149 volume->setMaxValue( 100 );
148 volume->setValue( 50 ); 150 volume->setValue( 50 );
149 volume->setOrientation( QSlider::Vertical ); 151 volume->setOrientation( QSlider::Vertical );
150 volume->setTickmarks( QSlider::Right ); 152 volume->setTickmarks( QSlider::Right );
151 volume->setTickInterval( 5 ); 153 volume->setTickInterval( 5 );
152 Layout12->addWidget( volume ); 154 Layout12->addWidget( volume );
153 QSpacerItem* spacer_5 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 155 QSpacerItem* spacer_5 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
154 Layout12->addItem( spacer_5 ); 156 Layout12->addItem( spacer_5 );
155 157
156 mic = new QSlider( GroupBox3, "mic" ); 158 mic = new QSlider( GroupBox3, "mic" );
157 mic->setMaxValue( 100 ); 159 mic->setMaxValue( 100 );
158 mic->setValue( 50 ); 160 mic->setValue( 50 );
159 mic->setOrientation( QSlider::Vertical ); 161 mic->setOrientation( QSlider::Vertical );
160 mic->setTickmarks( QSlider::Right ); 162 mic->setTickmarks( QSlider::Right );
161 mic->setTickInterval( 5 ); 163 mic->setTickInterval( 5 );
162 Layout12->addWidget( mic ); 164 Layout12->addWidget( mic );
163 QSpacerItem* spacer_6 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 165 QSpacerItem* spacer_6 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
164 Layout12->addItem( spacer_6 ); 166 Layout12->addItem( spacer_6 );
165 Layout10->addLayout( Layout12 ); 167 Layout10->addLayout( Layout12 );
166 168
167 Layout17 = new QHBoxLayout; 169 Layout17 = new QHBoxLayout;
168 Layout17->setSpacing( 2 ); 170 Layout17->setSpacing( 2 );
169 Layout17->setMargin( 2 ); 171 Layout17->setMargin( 2 );
170 QSpacerItem* spacer_7 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 172 QSpacerItem* spacer_7 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
171 Layout17->addItem( spacer_7 ); 173 Layout17->addItem( spacer_7 );
172 174
173 PixmapLabel2_2 = new QLabel( GroupBox3, "PixmapLabel2_2" ); 175 PixmapLabel2_2 = new QLabel( GroupBox3, "PixmapLabel2_2" );
174 PixmapLabel2_2->setPixmap( image1 ); 176 PixmapLabel2_2->setPixmap( image1 );
175 PixmapLabel2_2->setScaledContents( FALSE ); 177 PixmapLabel2_2->setScaledContents( FALSE );
176 Layout17->addWidget( PixmapLabel2_2 ); 178 Layout17->addWidget( PixmapLabel2_2 );
177 179
178 TextLabel2_2 = new QLabel( GroupBox3, "TextLabel2_2" ); 180 TextLabel2_2 = new QLabel( GroupBox3, "TextLabel2_2" );
179 TextLabel2_2->setText( tr( "Silent" ) ); 181 TextLabel2_2->setText( tr( "Silent" ) );
180 Layout17->addWidget( TextLabel2_2 ); 182 Layout17->addWidget( TextLabel2_2 );
181 QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 183 QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
182 Layout17->addItem( spacer_8 ); 184 Layout17->addItem( spacer_8 );
183 Layout10->addLayout( Layout17 ); 185 Layout10->addLayout( Layout17 );
184 GroupBox3Layout->addLayout( Layout10 ); 186 GroupBox3Layout->addLayout( Layout10 );
185 187
186 SoundSettingsBaseLayout->addWidget( GroupBox3, 0, 0 ); 188 SoundSettingsBaseLayout->addWidget( GroupBox3, 0, 0 );
187 189
188 Layout12_2 = new QVBoxLayout; 190 Layout12_2 = new QVBoxLayout;
189 Layout12_2->setSpacing( 2 ); 191 Layout12_2->setSpacing( 2 );
190 Layout12_2->setMargin( 2 ); 192 Layout12_2->setMargin( 2 );
191 193
192 GroupBox1 = new QGroupBox( this, "GroupBox1" ); 194 GroupBox1 = new QGroupBox( this, "GroupBox1" );
193 GroupBox1->setTitle( tr( "Vmemo" ) ); 195 GroupBox1->setTitle( tr( "Vmemo" ) );
194 196
195 QWidget* privateLayoutWidget = new QWidget( GroupBox1, "Layout11" ); 197 QWidget* privateLayoutWidget = new QWidget( GroupBox1, "Layout11" );
196 privateLayoutWidget->setGeometry( QRect( 5, 16, 96, 169 ) ); 198 privateLayoutWidget->setGeometry( QRect( 5, 16, 96, 169 ) );
197 Layout11 = new QVBoxLayout( privateLayoutWidget ); 199 Layout11 = new QVBoxLayout( privateLayoutWidget );
198 Layout11->setSpacing( 2 ); 200 Layout11->setSpacing( 2 );
199 Layout11->setMargin( 0 ); 201 Layout11->setMargin( 0 );
200 202
201 sampleRateLabel = new QLabel( privateLayoutWidget, "sampleRateLabel" ); 203 sampleRateLabel = new QLabel( privateLayoutWidget, "sampleRateLabel" );
202 sampleRateLabel->setText( tr( "Sample Rate" ) ); 204 sampleRateLabel->setText( tr( "Sample Rate" ) );
203 Layout11->addWidget( sampleRateLabel ); 205 Layout11->addWidget( sampleRateLabel );
204 206
205 sampleRate = new QComboBox( FALSE, privateLayoutWidget, "sampleRate" ); 207 sampleRate = new QComboBox( FALSE, privateLayoutWidget, "sampleRate" );
206 sampleRate->insertItem( tr( "8000" ) ); 208 sampleRate->insertItem( tr( "8000" ) );
207 sampleRate->insertItem( tr( "11025" ) ); 209 sampleRate->insertItem( tr( "11025" ) );
208 sampleRate->insertItem( tr( "22050" ) ); 210 sampleRate->insertItem( tr( "22050" ) );
209 sampleRate->insertItem( tr( "33075" ) ); 211 sampleRate->insertItem( tr( "33075" ) );
210 sampleRate->insertItem( tr( "44100" ) ); 212 sampleRate->insertItem( tr( "44100" ) );
211 sampleRate->setFixedWidth(90); 213 sampleRate->setFixedWidth(90);
212 Layout11->addWidget( sampleRate ); 214 Layout11->addWidget( sampleRate );
213 215
214 stereoCheckBox = new QCheckBox( privateLayoutWidget, "stereoCheckBox" ); 216 stereoCheckBox = new QCheckBox( privateLayoutWidget, "stereoCheckBox" );
215 stereoCheckBox->setText( tr( "Stereo" ) ); 217 stereoCheckBox->setText( tr( "Stereo" ) );
216 Layout11->addWidget( stereoCheckBox ); 218 Layout11->addWidget( stereoCheckBox );
217 219
218 sixteenBitCheckBox = new QCheckBox( privateLayoutWidget, "sixteenBitCheckBox" ); 220 sixteenBitCheckBox = new QCheckBox( privateLayoutWidget, "sixteenBitCheckBox" );
219 sixteenBitCheckBox->setText( tr( "16 bit" ) ); 221 sixteenBitCheckBox->setText( tr( "16 bit" ) );
220 Layout11->addWidget( sixteenBitCheckBox ); 222 Layout11->addWidget( sixteenBitCheckBox );
221 223
222 AlertCheckBox = new QCheckBox( privateLayoutWidget, "AlertCheckBox" ); 224 AlertCheckBox = new QCheckBox( privateLayoutWidget, "AlertCheckBox" );
223 AlertCheckBox->setText( tr( "Visual Alerts" ) ); 225 AlertCheckBox->setText( tr( "Visual Alerts" ) );
224 Layout11->addWidget( AlertCheckBox ); 226 Layout11->addWidget( AlertCheckBox );
225 227
226 TextLabel1 = new QLabel( privateLayoutWidget, "TextLabel1" ); 228 TextLabel1 = new QLabel( privateLayoutWidget, "TextLabel1" );
227 TextLabel1->setText( tr( "Location" ) ); 229 TextLabel1->setText( tr( "Location" ) );
228 Layout11->addWidget( TextLabel1 ); 230 Layout11->addWidget( TextLabel1 );
229 231
230 LocationComboBox = new QComboBox( FALSE, privateLayoutWidget, "LocationComboBox" ); 232 LocationComboBox = new QComboBox( FALSE, privateLayoutWidget, "LocationComboBox" );
231 Layout11->addWidget( LocationComboBox ); 233 Layout11->addWidget( LocationComboBox );
232 Layout12_2->addWidget( GroupBox1 ); 234 Layout12_2->addWidget( GroupBox1 );
233 235
234// // touchsound = new QCheckBox( this, "touchsound" ); 236// // touchsound = new QCheckBox( this, "touchsound" );
235// // touchsound->setText( tr( "Screen sounds" ) ); 237// // touchsound->setText( tr( "Screen sounds" ) );
236// // Layout12_2->addWidget( touchsound ); 238// // Layout12_2->addWidget( touchsound );
237 239
238// // keysound = new QCheckBox( this, "keysound" ); 240// // keysound = new QCheckBox( this, "keysound" );
239// // keysound->setText( tr( "Keyboard sounds" ) ); 241// // keysound->setText( tr( "Keyboard sounds" ) );
240// // Layout12_2->addWidget( keysound ); 242// // Layout12_2->addWidget( keysound );
241 QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); 243 QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
242 Layout12_2->addItem( spacer_9 ); 244 Layout12_2->addItem( spacer_9 );
243 245
244 SoundSettingsBaseLayout->addLayout( Layout12_2, 0, 1 ); 246 SoundSettingsBaseLayout->addLayout( Layout12_2, 0, 1 );
245} 247}
246 248
247/* 249/*
248 * Destroys the object and frees any allocated resources 250 * Destroys the object and frees any allocated resources
249 */ 251 */
250SoundSettingsBase::~SoundSettingsBase() 252SoundSettingsBase::~SoundSettingsBase()
251{ 253{
252 // no need to delete child widgets, Qt does it all for us 254 // no need to delete child widgets, Qt does it all for us
253} 255}
254
diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h
index e65c813..7a939ea 100644
--- a/noncore/settings/sound/soundsettingsbase.h
+++ b/noncore/settings/sound/soundsettingsbase.h
@@ -1,63 +1,65 @@
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>
15
14class QVBoxLayout; 16class QVBoxLayout;
15class QHBoxLayout; 17class QHBoxLayout;
16class QGridLayout; 18class QGridLayout;
17class QCheckBox; 19class QCheckBox;
18class QComboBox; 20class QComboBox;
19class QGroupBox; 21class QGroupBox;
20class QLabel; 22class QLabel;
21class QSlider; 23class QSlider;
22 24
23class SoundSettingsBase : public QDialog 25class SoundSettingsBase : public QMainWindow
24{ 26{
25 Q_OBJECT 27 Q_OBJECT
26 28
27public: 29public:
28 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 );
29 ~SoundSettingsBase(); 31 ~SoundSettingsBase();
30 32
31 QGroupBox* GroupBox3; 33 QGroupBox* GroupBox3;
32 QLabel* PixmapLabel1_2; 34 QLabel* PixmapLabel1_2;
33 QLabel* TextLabel1_2; 35 QLabel* TextLabel1_2;
34 QLabel* volLabel; 36 QLabel* volLabel;
35 QLabel* micLabel; 37 QLabel* micLabel;
36 QSlider* volume; 38 QSlider* volume;
37 QSlider* mic; 39 QSlider* mic;
38 QLabel* PixmapLabel2_2; 40 QLabel* PixmapLabel2_2;
39 QLabel* TextLabel2_2; 41 QLabel* TextLabel2_2;
40 QGroupBox* GroupBox1; 42 QGroupBox* GroupBox1;
41 QLabel* sampleRateLabel; 43 QLabel* sampleRateLabel;
42 QComboBox* sampleRate; 44 QComboBox* sampleRate;
43 QCheckBox* stereoCheckBox; 45 QCheckBox* stereoCheckBox;
44 QCheckBox* sixteenBitCheckBox; 46 QCheckBox* sixteenBitCheckBox;
45 QCheckBox* AlertCheckBox; 47 QCheckBox* AlertCheckBox;
46 QLabel* TextLabel1; 48 QLabel* TextLabel1;
47 QComboBox* LocationComboBox; 49 QComboBox* LocationComboBox;
48/* QCheckBox* touchsound; */
49/* QCheckBox* keysound; */
50 50
51protected: 51protected:
52 QGridLayout* SoundSettingsBaseLayout; 52 QGridLayout* SoundSettingsBaseLayout;
53 QVBoxLayout* GroupBox3Layout; 53 QVBoxLayout* GroupBox3Layout;
54 QVBoxLayout* Layout10; 54 QVBoxLayout* Layout10;
55 QHBoxLayout* Layout16; 55 QHBoxLayout* Layout16;
56 QHBoxLayout* Layout13; 56 QHBoxLayout* Layout13;
57 QHBoxLayout* Layout12; 57 QHBoxLayout* Layout12;
58 QHBoxLayout* Layout17; 58 QHBoxLayout* Layout17;
59 QVBoxLayout* Layout12_2; 59 QVBoxLayout* Layout12_2;
60 QVBoxLayout* Layout11; 60 QVBoxLayout* Layout11;
61protected slots:
62
61}; 63};
62 64
63#endif // SOUNDSETTINGSBASE_H 65#endif // SOUNDSETTINGSBASE_H