author | llornkcor <llornkcor> | 2003-05-26 04:21:39 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-05-26 04:21:39 (UTC) |
commit | 57e35a76319a949cb9c065aabf953645b79e7d96 (patch) (unidiff) | |
tree | 2397ee1eee9bb2c5fb765f206a81d5b9da789f03 | |
parent | f63dee18fe56ba54d9203836722a1f499e2539f3 (diff) | |
download | opie-57e35a76319a949cb9c065aabf953645b79e7d96.zip opie-57e35a76319a949cb9c065aabf953645b79e7d96.tar.gz opie-57e35a76319a949cb9c065aabf953645b79e7d96.tar.bz2 |
remove extra includes
-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.cpp | 9 |
2 files changed, 0 insertions, 13 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index afcdd49..09d2e92 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp | |||
@@ -1,129 +1,125 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | // parts copyright 2002 L.J. Potter | 20 | // parts copyright 2002 L.J. Potter |
21 | 21 | ||
22 | #include "soundsettings.h" | 22 | #include "soundsettings.h" |
23 | 23 | ||
24 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
25 | #include <qpe/config.h> | 25 | #include <qpe/config.h> |
26 | #include <qpe/qcopenvelope_qws.h> | 26 | #include <qpe/qcopenvelope_qws.h> |
27 | #include <qpe/storage.h> | 27 | #include <qpe/storage.h> |
28 | 28 | ||
29 | #include <qmessagebox.h> | ||
30 | #include <qapplication.h> | ||
31 | #include <qslider.h> | ||
32 | #include <qcheckbox.h> | 29 | #include <qcheckbox.h> |
33 | #include <qlineedit.h> | ||
34 | #include <qcombobox.h> | 30 | #include <qcombobox.h> |
35 | #include <qlabel.h> | 31 | #include <qlabel.h> |
36 | 32 | ||
37 | #include <sys/utsname.h> | 33 | #include <sys/utsname.h> |
38 | #include <sys/time.h> | 34 | #include <sys/time.h> |
39 | #include <sys/types.h> | 35 | #include <sys/types.h> |
40 | #include <unistd.h> | 36 | #include <unistd.h> |
41 | #include <stdio.h> | 37 | #include <stdio.h> |
42 | #include <sys/stat.h> | 38 | #include <sys/stat.h> |
43 | 39 | ||
44 | 40 | ||
45 | SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) | 41 | SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) |
46 | : SoundSettingsBase( parent, objname, TRUE, fl ) | 42 | : SoundSettingsBase( parent, objname, TRUE, fl ) |
47 | { | 43 | { |
48 | keyReset=FALSE; | 44 | keyReset=FALSE; |
49 | noWarning=false; | 45 | noWarning=false; |
50 | Config config( "qpe"); | 46 | Config config( "qpe"); |
51 | config.setGroup( "Volume" ); | 47 | config.setGroup( "Volume" ); |
52 | Config cfg("Vmemo"); | 48 | Config cfg("Vmemo"); |
53 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 49 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
54 | AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); | 50 | AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); |
55 | 51 | ||
56 | cfg.setGroup("Record"); | 52 | cfg.setGroup("Record"); |
57 | int rate=config.readNumEntry("SampleRate", 22050); | 53 | int rate=config.readNumEntry("SampleRate", 22050); |
58 | if(rate == 8000) | 54 | if(rate == 8000) |
59 | sampleRate->setCurrentItem(0); | 55 | sampleRate->setCurrentItem(0); |
60 | else if(rate == 11025) | 56 | else if(rate == 11025) |
61 | sampleRate->setCurrentItem(1); | 57 | sampleRate->setCurrentItem(1); |
62 | else if(rate == 22050) | 58 | else if(rate == 22050) |
63 | sampleRate->setCurrentItem(2); | 59 | sampleRate->setCurrentItem(2); |
64 | else if(rate == 33075) | 60 | else if(rate == 33075) |
65 | sampleRate->setCurrentItem(3); | 61 | sampleRate->setCurrentItem(3); |
66 | else if(rate==44100) | 62 | else if(rate==44100) |
67 | sampleRate->setCurrentItem(4); | 63 | sampleRate->setCurrentItem(4); |
68 | 64 | ||
69 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); | 65 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); |
70 | //TODO hide if zaurus- mono only | 66 | //TODO hide if zaurus- mono only |
71 | 67 | ||
72 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) | 68 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) |
73 | //since ipaq and zaurus have particular | 69 | //since ipaq and zaurus have particular |
74 | //devices | 70 | //devices |
75 | bool systemZaurus=FALSE; | 71 | bool systemZaurus=FALSE; |
76 | struct utsname name; /* check for embedix kernel running on the zaurus*/ | 72 | struct utsname name; /* check for embedix kernel running on the zaurus*/ |
77 | if (uname(&name) != -1) {// TODO change this here,... | 73 | if (uname(&name) != -1) {// TODO change this here,... |
78 | QString release=name.release; | 74 | QString release=name.release; |
79 | if( release.find("embedix",0,TRUE) != -1) { | 75 | if( release.find("embedix",0,TRUE) != -1) { |
80 | qDebug("IS System Zaurus"); | 76 | qDebug("IS System Zaurus"); |
81 | systemZaurus=TRUE; | 77 | systemZaurus=TRUE; |
82 | } | 78 | } |
83 | } | 79 | } |
84 | if(!systemZaurus) { | 80 | if(!systemZaurus) { |
85 | stereoCheckBox->setChecked(TRUE); | 81 | stereoCheckBox->setChecked(TRUE); |
86 | } | 82 | } |
87 | stereoCheckBox->setEnabled(FALSE); | 83 | stereoCheckBox->setEnabled(FALSE); |
88 | sixteenBitCheckBox->setEnabled(FALSE); | 84 | sixteenBitCheckBox->setEnabled(FALSE); |
89 | #else | 85 | #else |
90 | #endif | 86 | #endif |
91 | int sRate=cfg.readNumEntry("SizeLimit", 30); | 87 | int sRate=cfg.readNumEntry("SizeLimit", 30); |
92 | qDebug("%d",sRate); | 88 | qDebug("%d",sRate); |
93 | 89 | ||
94 | if(sRate ==30) | 90 | if(sRate ==30) |
95 | timeLimitComboBox->setCurrentItem(0); | 91 | timeLimitComboBox->setCurrentItem(0); |
96 | else if(sRate==20) | 92 | else if(sRate==20) |
97 | timeLimitComboBox->setCurrentItem(1); | 93 | timeLimitComboBox->setCurrentItem(1); |
98 | else if(sRate == 15) | 94 | else if(sRate == 15) |
99 | timeLimitComboBox->setCurrentItem(2); | 95 | timeLimitComboBox->setCurrentItem(2); |
100 | else if(sRate == 10) | 96 | else if(sRate == 10) |
101 | timeLimitComboBox->setCurrentItem(3); | 97 | timeLimitComboBox->setCurrentItem(3); |
102 | else if(sRate == 5) | 98 | else if(sRate == 5) |
103 | timeLimitComboBox->setCurrentItem(4); | 99 | timeLimitComboBox->setCurrentItem(4); |
104 | else | 100 | else |
105 | timeLimitComboBox->setCurrentItem(5); | 101 | timeLimitComboBox->setCurrentItem(5); |
106 | 102 | ||
107 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); | 103 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); |
108 | 104 | ||
109 | cfg.setGroup("Defaults"); | 105 | cfg.setGroup("Defaults"); |
110 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); | 106 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); |
111 | 107 | ||
112 | updateStorageCombo(); | 108 | updateStorageCombo(); |
113 | connect( LocationComboBox,SIGNAL(activated(const QString &)), this, | 109 | connect( LocationComboBox,SIGNAL(activated(const QString &)), this, |
114 | SLOT( setLocation(const QString &))); | 110 | SLOT( setLocation(const QString &))); |
115 | connect( keyComboBox,SIGNAL(activated( int)), this, | 111 | connect( keyComboBox,SIGNAL(activated( int)), this, |
116 | SLOT( setKeyButton( int))); | 112 | SLOT( setKeyButton( int))); |
117 | connect( timeLimitComboBox,SIGNAL(activated( const QString &)), this, | 113 | connect( timeLimitComboBox,SIGNAL(activated( const QString &)), this, |
118 | SLOT( setSizeLimitButton(const QString &))); | 114 | SLOT( setSizeLimitButton(const QString &))); |
119 | connect( restartCheckBox,SIGNAL( toggled( bool)), this, | 115 | connect( restartCheckBox,SIGNAL( toggled( bool)), this, |
120 | SLOT( restartOpie( bool))); | 116 | SLOT( restartOpie( bool))); |
121 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 117 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
122 | } | 118 | } |
123 | 119 | ||
124 | void SoundSettings::updateStorageCombo() { | 120 | void SoundSettings::updateStorageCombo() { |
125 | 121 | ||
126 | Config config( "Vmemo" ); | 122 | Config config( "Vmemo" ); |
127 | config.setGroup( "System" ); | 123 | config.setGroup( "System" ); |
128 | QString loc = config.readEntry("RecLocation","/"); | 124 | QString loc = config.readEntry("RecLocation","/"); |
129 | int i=0; | 125 | int i=0; |
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp index 5421bb4..af794ba 100644 --- a/noncore/settings/sound/soundsettingsbase.cpp +++ b/noncore/settings/sound/soundsettingsbase.cpp | |||
@@ -1,120 +1,111 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** Form implementation generated from reading ui file 'soundsettingsbase.ui' | 2 | ** Form implementation generated from reading ui file 'soundsettingsbase.ui' |
3 | ** | 3 | ** |
4 | ** Created: Sun May 19 12:11:35 2002 | 4 | ** Created: Sun May 19 12:11:35 2002 |
5 | ** by: The User Interface Compiler (uic) | 5 | ** by: The User Interface Compiler (uic) |
6 | ** | 6 | ** |
7 | ** WARNING! All changes made in this file will be lost! | 7 | ** WARNING! All changes made in this file will be lost! |
8 | ****************************************************************************/ | 8 | ****************************************************************************/ |
9 | #include "soundsettingsbase.h" | 9 | #include "soundsettingsbase.h" |
10 | 10 | ||
11 | #include <qcheckbox.h> | 11 | #include <qcheckbox.h> |
12 | #include <qcombobox.h> | 12 | #include <qcombobox.h> |
13 | #include <qgroupbox.h> | ||
14 | #include <qmainwindow.h> | ||
15 | 13 | ||
16 | #include <qpe/qpeapplication.h> | ||
17 | #include <qlabel.h> | 14 | #include <qlabel.h> |
18 | #include <qpushbutton.h> | ||
19 | #include <qslider.h> | ||
20 | #include <qlayout.h> | 15 | #include <qlayout.h> |
21 | #include <qvariant.h> | ||
22 | #include <qtooltip.h> | ||
23 | #include <qwhatsthis.h> | ||
24 | #include <qimage.h> | ||
25 | #include <qpixmap.h> | 16 | #include <qpixmap.h> |
26 | 17 | ||
27 | static const char* const image0_data[] = { | 18 | static const char* const image0_data[] = { |
28 | "16 16 3 1", | 19 | "16 16 3 1", |
29 | ". c None", | 20 | ". c None", |
30 | "a c #000000", | 21 | "a c #000000", |
31 | "# c #ff0000", | 22 | "# c #ff0000", |
32 | "............#...", | 23 | "............#...", |
33 | "............##..", | 24 | "............##..", |
34 | "..........#..#..", | 25 | "..........#..#..", |
35 | ".....a..#..#.#..", | 26 | ".....a..#..#.#..", |
36 | "....aa..##.#..#.", | 27 | "....aa..##.#..#.", |
37 | "...aaa...#.##.#.", | 28 | "...aaa...#.##.#.", |
38 | "aaaaaa.#.#..#.##", | 29 | "aaaaaa.#.#..#.##", |
39 | "aaaaaa.#.##.#.##", | 30 | "aaaaaa.#.##.#.##", |
40 | "aaaaaa.#.##.#.##", | 31 | "aaaaaa.#.##.#.##", |
41 | "aaaaaa.#.##.#.##", | 32 | "aaaaaa.#.##.#.##", |
42 | "aaaaaa.#.#..#.##", | 33 | "aaaaaa.#.#..#.##", |
43 | "...aaa...#.##.#.", | 34 | "...aaa...#.##.#.", |
44 | "....aa..#..#..#.", | 35 | "....aa..#..#..#.", |
45 | ".....a.....#.##.", | 36 | ".....a.....#.##.", |
46 | "..........#..#..", | 37 | "..........#..#..", |
47 | "............##.."}; | 38 | "............##.."}; |
48 | 39 | ||
49 | static const char* const image1_data[] = { | 40 | static const char* const image1_data[] = { |
50 | "16 16 3 1", | 41 | "16 16 3 1", |
51 | ". c None", | 42 | ". c None", |
52 | "# c #000000", | 43 | "# c #000000", |
53 | "a c #ff0000", | 44 | "a c #ff0000", |
54 | "................", | 45 | "................", |
55 | "................", | 46 | "................", |
56 | "................", | 47 | "................", |
57 | ".....#..........", | 48 | ".....#..........", |
58 | "....##..........", | 49 | "....##..........", |
59 | "...###...a...a..", | 50 | "...###...a...a..", |
60 | "######..aaa.aaa.", | 51 | "######..aaa.aaa.", |
61 | "######...aaaaa..", | 52 | "######...aaaaa..", |
62 | "######....aaa...", | 53 | "######....aaa...", |
63 | "######...aaaaa..", | 54 | "######...aaaaa..", |
64 | "######..aaa.aaa.", | 55 | "######..aaa.aaa.", |
65 | "...###...a...a..", | 56 | "...###...a...a..", |
66 | "....##..........", | 57 | "....##..........", |
67 | ".....#..........", | 58 | ".....#..........", |
68 | "................", | 59 | "................", |
69 | "................"}; | 60 | "................"}; |
70 | 61 | ||
71 | 62 | ||
72 | /* | 63 | /* |
73 | * Constructs a SoundSettingsBase which is a child of 'parent', with the | 64 | * Constructs a SoundSettingsBase which is a child of 'parent', with the |
74 | * name 'name' and widget flags set to 'f' | 65 | * name 'name' and widget flags set to 'f' |
75 | * | 66 | * |
76 | * The dialog will by default be modeless, unless you set 'modal' to | 67 | * The dialog will by default be modeless, unless you set 'modal' to |
77 | * TRUE to construct a modal dialog. | 68 | * TRUE to construct a modal dialog. |
78 | */ | 69 | */ |
79 | SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl ) | 70 | SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl ) |
80 | : QMainWindow( parent, name, fl ) | 71 | : QMainWindow( parent, name, fl ) |
81 | { | 72 | { |
82 | QPixmap image0( ( const char** ) image0_data ); | 73 | QPixmap image0( ( const char** ) image0_data ); |
83 | QPixmap image1( ( const char** ) image1_data ); | 74 | QPixmap image1( ( const char** ) image1_data ); |
84 | if ( !name ) | 75 | if ( !name ) |
85 | setName( "SoundSettingsBase" ); | 76 | setName( "SoundSettingsBase" ); |
86 | // resize(255,301); | 77 | // resize(255,301); |
87 | setCaption( tr( "Vmemo Settings" ) ); | 78 | setCaption( tr( "Vmemo Settings" ) ); |
88 | 79 | ||
89 | SoundSettingsBaseLayout = new QGridLayout( this ); | 80 | SoundSettingsBaseLayout = new QGridLayout( this ); |
90 | SoundSettingsBaseLayout->setSpacing( 4 ); | 81 | SoundSettingsBaseLayout->setSpacing( 4 ); |
91 | SoundSettingsBaseLayout->setMargin( 4 ); | 82 | SoundSettingsBaseLayout->setMargin( 4 ); |
92 | 83 | ||
93 | QHBoxLayout *Layout11; | 84 | QHBoxLayout *Layout11; |
94 | Layout11 = new QHBoxLayout; | 85 | Layout11 = new QHBoxLayout; |
95 | Layout11->setSpacing( 4 ); | 86 | Layout11->setSpacing( 4 ); |
96 | Layout11->setMargin( 0 ); | 87 | Layout11->setMargin( 0 ); |
97 | 88 | ||
98 | stereoCheckBox = new QCheckBox( this, "stereoCheckBox" ); | 89 | stereoCheckBox = new QCheckBox( this, "stereoCheckBox" ); |
99 | stereoCheckBox->setText( tr( "Stereo" ) ); | 90 | stereoCheckBox->setText( tr( "Stereo" ) ); |
100 | Layout11->addWidget( stereoCheckBox ); | 91 | Layout11->addWidget( stereoCheckBox ); |
101 | 92 | ||
102 | sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" ); | 93 | sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" ); |
103 | sixteenBitCheckBox->setText( tr( "16 bit" ) ); | 94 | sixteenBitCheckBox->setText( tr( "16 bit" ) ); |
104 | Layout11->addWidget( sixteenBitCheckBox ); | 95 | Layout11->addWidget( sixteenBitCheckBox ); |
105 | 96 | ||
106 | AlertCheckBox = new QCheckBox( this, "AlertCheckBox" ); | 97 | AlertCheckBox = new QCheckBox( this, "AlertCheckBox" ); |
107 | AlertCheckBox->setText( tr( "Visual Alerts" ) ); | 98 | AlertCheckBox->setText( tr( "Visual Alerts" ) ); |
108 | Layout11->addWidget( AlertCheckBox ); | 99 | Layout11->addWidget( AlertCheckBox ); |
109 | 100 | ||
110 | SoundSettingsBaseLayout->addLayout( Layout11, 0, 0); | 101 | SoundSettingsBaseLayout->addLayout( Layout11, 0, 0); |
111 | 102 | ||
112 | sampleRateLabel = new QLabel(this, "sampleRateLabel" ); | 103 | sampleRateLabel = new QLabel(this, "sampleRateLabel" ); |
113 | sampleRateLabel->setText( tr( "Sample Rate:" ) ); | 104 | sampleRateLabel->setText( tr( "Sample Rate:" ) ); |
114 | SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0, 1); | 105 | SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0, 1); |
115 | 106 | ||
116 | sampleRate = new QComboBox( FALSE,this, "sampleRate" ); | 107 | sampleRate = new QComboBox( FALSE,this, "sampleRate" ); |
117 | 108 | ||
118 | sampleRate->insertItem( tr( "8000" ) ); | 109 | sampleRate->insertItem( tr( "8000" ) ); |
119 | sampleRate->insertItem( tr( "11025" ) ); | 110 | sampleRate->insertItem( tr( "11025" ) ); |
120 | sampleRate->insertItem( tr( "22050" ) ); | 111 | sampleRate->insertItem( tr( "22050" ) ); |