Diffstat (limited to 'noncore/settings/sound/soundsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index 8ad0a3f..d55a751 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp | |||
@@ -18,26 +18,30 @@ | |||
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 | /* OPIE */ | ||
25 | #include <opie2/odebug.h> | ||
24 | #include <qpe/qpeapplication.h> | 26 | #include <qpe/qpeapplication.h> |
25 | #include <qpe/config.h> | 27 | #include <qpe/config.h> |
26 | #include <qpe/qcopenvelope_qws.h> | 28 | #include <qpe/qcopenvelope_qws.h> |
27 | #include <qpe/storage.h> | 29 | #include <qpe/storage.h> |
30 | using namespace Opie::Core; | ||
28 | 31 | ||
32 | /* QT */ | ||
29 | #include <qcheckbox.h> | 33 | #include <qcheckbox.h> |
30 | #include <qcombobox.h> | 34 | #include <qcombobox.h> |
31 | #include <qlabel.h> | 35 | #include <qlabel.h> |
32 | 36 | ||
37 | /* STD */ | ||
33 | #include <sys/utsname.h> | 38 | #include <sys/utsname.h> |
34 | #include <sys/time.h> | 39 | #include <sys/time.h> |
35 | #include <sys/types.h> | 40 | #include <sys/types.h> |
36 | #include <unistd.h> | 41 | #include <unistd.h> |
37 | #include <stdio.h> | ||
38 | #include <sys/stat.h> | 42 | #include <sys/stat.h> |
39 | 43 | ||
40 | 44 | ||
41 | SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) | 45 | SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) |
42 | : SoundSettingsBase( parent, objname, TRUE, fl ) | 46 | : SoundSettingsBase( parent, objname, TRUE, fl ) |
43 | { | 47 | { |
@@ -70,25 +74,25 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) | |||
70 | //devices | 74 | //devices |
71 | bool systemZaurus=FALSE; | 75 | bool systemZaurus=FALSE; |
72 | struct utsname name; /* check for embedix kernel running on the zaurus*/ | 76 | struct utsname name; /* check for embedix kernel running on the zaurus*/ |
73 | if (uname(&name) != -1) {// TODO change this here,... | 77 | if (uname(&name) != -1) {// TODO change this here,... |
74 | QString release=name.release; | 78 | QString release=name.release; |
75 | if( release.find("embedix",0,TRUE) != -1) { | 79 | if( release.find("embedix",0,TRUE) != -1) { |
76 | qDebug("IS System Zaurus"); | 80 | odebug << "IS System Zaurus" << oendl; |
77 | systemZaurus=TRUE; | 81 | systemZaurus=TRUE; |
78 | } | 82 | } |
79 | } | 83 | } |
80 | if(!systemZaurus) { | 84 | if(!systemZaurus) { |
81 | stereoCheckBox->setChecked(TRUE); | 85 | stereoCheckBox->setChecked(TRUE); |
82 | } | 86 | } |
83 | stereoCheckBox->setEnabled(FALSE); | 87 | stereoCheckBox->setEnabled(FALSE); |
84 | sixteenBitCheckBox->setEnabled(FALSE); | 88 | sixteenBitCheckBox->setEnabled(FALSE); |
85 | #else | 89 | #else |
86 | #endif | 90 | #endif |
87 | int sRate=cfg.readNumEntry("SizeLimit", 30); | 91 | int sRate=cfg.readNumEntry("SizeLimit", 30); |
88 | qDebug("%d",sRate); | 92 | odebug << "" << sRate << "" << oendl; |
89 | 93 | ||
90 | if(sRate ==30) | 94 | if(sRate ==30) |
91 | timeLimitComboBox->setCurrentItem(0); | 95 | timeLimitComboBox->setCurrentItem(0); |
92 | else if(sRate==20) | 96 | else if(sRate==20) |
93 | timeLimitComboBox->setCurrentItem(1); | 97 | timeLimitComboBox->setCurrentItem(1); |
94 | else if(sRate == 15) | 98 | else if(sRate == 15) |
@@ -140,30 +144,30 @@ void SoundSettings::updateStorageCombo() { | |||
140 | 144 | ||
141 | const QList<FileSystem> &fs = storageInfo.fileSystems(); | 145 | const QList<FileSystem> &fs = storageInfo.fileSystems(); |
142 | QListIterator<FileSystem> it ( fs ); | 146 | QListIterator<FileSystem> it ( fs ); |
143 | for( ; it.current(); ++it ){ | 147 | for( ; it.current(); ++it ){ |
144 | const QString name = (*it)->name(); | 148 | const QString name = (*it)->name(); |
145 | const QString path = (*it)->path(); | 149 | const QString path = (*it)->path(); |
146 | qDebug("storage name "+name +" storage path is "+path); | 150 | odebug << "storage name "+name +" storage path is "+path << oendl; |
147 | list << name + ": " +path; | 151 | list << name + ": " +path; |
148 | if( loc.find( path,0,TRUE) != -1) | 152 | if( loc.find( path,0,TRUE) != -1) |
149 | set = i; | 153 | set = i; |
150 | // if(dit.current()->file().find(path) != -1 ) storage=name; | 154 | // if(dit.current()->file().find(path) != -1 ) storage=name; |
151 | i++; | 155 | i++; |
152 | } | 156 | } |
153 | 157 | ||
154 | LocationComboBox->insertStringList(list); | 158 | LocationComboBox->insertStringList(list); |
155 | qDebug("set item %d", set); | 159 | odebug << "set item " << set << "" << oendl; |
156 | LocationComboBox->setCurrentItem(set); | 160 | LocationComboBox->setCurrentItem(set); |
157 | } | 161 | } |
158 | 162 | ||
159 | void SoundSettings::setLocation(const QString & string) { | 163 | void SoundSettings::setLocation(const QString & string) { |
160 | Config config( "Vmemo" ); | 164 | Config config( "Vmemo" ); |
161 | config.setGroup( "System" ); | 165 | config.setGroup( "System" ); |
162 | config.writeEntry("RecLocation",string); | 166 | config.writeEntry("RecLocation",string); |
163 | qDebug("set location "+string); | 167 | odebug << "set location "+string << oendl; |
164 | config.write(); | 168 | config.write(); |
165 | } | 169 | } |
166 | 170 | ||
167 | void SoundSettings::cleanUp() { | 171 | void SoundSettings::cleanUp() { |
168 | Config cfg("Vmemo"); | 172 | Config cfg("Vmemo"); |
169 | cfg.writeEntry("Alert",AlertCheckBox->isChecked()); | 173 | cfg.writeEntry("Alert",AlertCheckBox->isChecked()); |