-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,97 +1,93 @@ | |||
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); |
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,88 +1,79 @@ | |||
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 | ||