-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index dd341c0..afcdd49 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp | |||
@@ -24,97 +24,97 @@ | |||
24 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
25 | #include <qpe/config.h> | 25 | #include <qpe/config.h> |
26 | #include <qpe/qcopenvelope_qws.h> | 26 | #include <qpe/qcopenvelope_qws.h> |
27 | #include <qpe/storage.h> | 27 | #include <qpe/storage.h> |
28 | 28 | ||
29 | #include <qmessagebox.h> | 29 | #include <qmessagebox.h> |
30 | #include <qapplication.h> | 30 | #include <qapplication.h> |
31 | #include <qslider.h> | 31 | #include <qslider.h> |
32 | #include <qcheckbox.h> | 32 | #include <qcheckbox.h> |
33 | #include <qlineedit.h> | 33 | #include <qlineedit.h> |
34 | #include <qcombobox.h> | 34 | #include <qcombobox.h> |
35 | #include <qlabel.h> | 35 | #include <qlabel.h> |
36 | 36 | ||
37 | #include <sys/utsname.h> | 37 | #include <sys/utsname.h> |
38 | #include <sys/time.h> | 38 | #include <sys/time.h> |
39 | #include <sys/types.h> | 39 | #include <sys/types.h> |
40 | #include <unistd.h> | 40 | #include <unistd.h> |
41 | #include <stdio.h> | 41 | #include <stdio.h> |
42 | #include <sys/stat.h> | 42 | #include <sys/stat.h> |
43 | 43 | ||
44 | 44 | ||
45 | SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) | 45 | SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) |
46 | : SoundSettingsBase( parent, objname, TRUE, fl ) | 46 | : SoundSettingsBase( parent, objname, TRUE, fl ) |
47 | { | 47 | { |
48 | keyReset=FALSE; | 48 | keyReset=FALSE; |
49 | noWarning=false; | 49 | noWarning=false; |
50 | Config config( "qpe"); | 50 | Config config( "qpe"); |
51 | config.setGroup( "Volume" ); | 51 | config.setGroup( "Volume" ); |
52 | Config cfg("Vmemo"); | 52 | Config cfg("Vmemo"); |
53 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 53 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
54 | AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); | 54 | AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); |
55 | 55 | ||
56 | cfg.setGroup("Record"); | 56 | cfg.setGroup("Record"); |
57 | int rate=config.readNumEntry("SampleRate", 22050); | 57 | int rate=config.readNumEntry("SampleRate", 22050); |
58 | if(rate == 8000) | 58 | if(rate == 8000) |
59 | sampleRate->setCurrentItem(0); | 59 | sampleRate->setCurrentItem(0); |
60 | else if(rate == 11025) | 60 | else if(rate == 11025) |
61 | sampleRate->setCurrentItem(1); | 61 | sampleRate->setCurrentItem(1); |
62 | else if(rate == 22050) | 62 | else if(rate == 22050) |
63 | sampleRate->setCurrentItem(2); | 63 | sampleRate->setCurrentItem(2); |
64 | else if(rate == 33075) | 64 | else if(rate == 33075) |
65 | sampleRate->setCurrentItem(3); | 65 | sampleRate->setCurrentItem(3); |
66 | else if(rate==44100) | 66 | else if(rate==44100) |
67 | sampleRate->setCurrentItem(4); | 67 | sampleRate->setCurrentItem(4); |
68 | 68 | ||
69 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); | 69 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); |
70 | //TODO hide if zaurus- mono only | 70 | //TODO hide if zaurus- mono only |
71 | 71 | ||
72 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) | 72 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) |
73 | //since ipaq and zaurus have particular | 73 | //since ipaq and zaurus have particular |
74 | //devices | 74 | //devices |
75 | bool systemZaurus=FALSE; | 75 | bool systemZaurus=FALSE; |
76 | struct utsname name; /* check for embedix kernel running on the zaurus*/ | 76 | struct utsname name; /* check for embedix kernel running on the zaurus*/ |
77 | if (uname(&name) != -1) {// TODO change this here,... | 77 | if (uname(&name) != -1) {// TODO change this here,... |
78 | QString release=name.release; | 78 | QString release=name.release; |
79 | if( release.find("embedix",0,TRUE) != -1) { | 79 | if( release.find("embedix",0,TRUE) != -1) { |
80 | qDebug("IS System Zaurus"); | 80 | qDebug("IS System Zaurus"); |
81 | systemZaurus=TRUE; | 81 | systemZaurus=TRUE; |
82 | } | 82 | } |
83 | } | 83 | } |
84 | if(!systemZaurus) { | 84 | if(!systemZaurus) { |
85 | stereoCheckBox->setChecked(TRUE); | 85 | stereoCheckBox->setChecked(TRUE); |
86 | } | 86 | } |
87 | stereoCheckBox->setEnabled(FALSE); | 87 | stereoCheckBox->setEnabled(FALSE); |
88 | sixteenBitCheckBox->setEnabled(FALSE); | 88 | sixteenBitCheckBox->setEnabled(FALSE); |
89 | #else | 89 | #else |
90 | #endif | 90 | #endif |
91 | int sRate=cfg.readNumEntry("SizeLimit", 30); | 91 | int sRate=cfg.readNumEntry("SizeLimit", 30); |
92 | qDebug("%d",sRate); | 92 | qDebug("%d",sRate); |
93 | 93 | ||
94 | if(sRate ==30) | 94 | if(sRate ==30) |
95 | timeLimitComboBox->setCurrentItem(0); | 95 | timeLimitComboBox->setCurrentItem(0); |
96 | else if(sRate==20) | 96 | else if(sRate==20) |
97 | timeLimitComboBox->setCurrentItem(1); | 97 | timeLimitComboBox->setCurrentItem(1); |
98 | else if(sRate == 15) | 98 | else if(sRate == 15) |
99 | timeLimitComboBox->setCurrentItem(2); | 99 | timeLimitComboBox->setCurrentItem(2); |
100 | else if(sRate == 10) | 100 | else if(sRate == 10) |
101 | timeLimitComboBox->setCurrentItem(3); | 101 | timeLimitComboBox->setCurrentItem(3); |
102 | else if(sRate == 5) | 102 | else if(sRate == 5) |
103 | timeLimitComboBox->setCurrentItem(4); | 103 | timeLimitComboBox->setCurrentItem(4); |
104 | else | 104 | else |
105 | timeLimitComboBox->setCurrentItem(5); | 105 | timeLimitComboBox->setCurrentItem(5); |
106 | 106 | ||
107 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); | 107 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); |
108 | 108 | ||
109 | cfg.setGroup("Defaults"); | 109 | cfg.setGroup("Defaults"); |
110 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); | 110 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); |
111 | 111 | ||
112 | updateStorageCombo(); | 112 | updateStorageCombo(); |
113 | connect( LocationComboBox,SIGNAL(activated(const QString &)), this, | 113 | connect( LocationComboBox,SIGNAL(activated(const QString &)), this, |
114 | SLOT( setLocation(const QString &))); | 114 | SLOT( setLocation(const QString &))); |
115 | connect( keyComboBox,SIGNAL(activated( int)), this, | 115 | connect( keyComboBox,SIGNAL(activated( int)), this, |
116 | SLOT( setKeyButton( int))); | 116 | SLOT( setKeyButton( int))); |
117 | connect( timeLimitComboBox,SIGNAL(activated( const QString &)), this, | 117 | connect( timeLimitComboBox,SIGNAL(activated( const QString &)), this, |
118 | SLOT( setSizeLimitButton(const QString &))); | 118 | SLOT( setSizeLimitButton(const QString &))); |
119 | connect( restartCheckBox,SIGNAL( toggled( bool)), this, | 119 | connect( restartCheckBox,SIGNAL( toggled( bool)), this, |
120 | SLOT( restartOpie( bool))); | 120 | SLOT( restartOpie( bool))); |