summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-08-26 23:43:26 (UTC)
committer llornkcor <llornkcor>2002-08-26 23:43:26 (UTC)
commit4b4296a50692281b9414372db1b598b46e6f8f5e (patch) (unidiff)
treeca26a8adb48a14c0d21032340a8a070e31665e29
parentfd60f8aac384983daf7999c20bf827a8bacf8f8f (diff)
downloadopie-4b4296a50692281b9414372db1b598b46e6f8f5e.zip
opie-4b4296a50692281b9414372db1b598b46e6f8f5e.tar.gz
opie-4b4296a50692281b9414372db1b598b46e6f8f5e.tar.bz2
should compile before commit
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index 8b97e4d..20f0dab 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -1,92 +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>
29#include <qapplication.h> 30#include <qapplication.h>
30#include <qslider.h> 31#include <qslider.h>
31#include <qcheckbox.h> 32#include <qcheckbox.h>
32#include <qlineedit.h> 33#include <qlineedit.h>
33#include <qcombobox.h> 34#include <qcombobox.h>
34 35
35#include <sys/utsname.h> 36#include <sys/utsname.h>
36#include <sys/time.h> 37#include <sys/time.h>
37#include <sys/types.h> 38#include <sys/types.h>
38#include <unistd.h> 39#include <unistd.h>
39#include <stdio.h> 40#include <stdio.h>
40#include <sys/stat.h> 41#include <sys/stat.h>
41 42
42SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) 43SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
43 : SoundSettingsBase( parent, objname, TRUE, fl ) 44 : SoundSettingsBase( parent, objname, TRUE, fl )
44{ 45{
45 keyReset=FALSE; 46 keyReset=FALSE;
46 47
47 Config config( "qpe"); 48 Config config( "qpe");
48 config.setGroup( "Volume" ); 49 config.setGroup( "Volume" );
49 Config cfg("Vmemo"); 50 Config cfg("Vmemo");
50 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 51 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
51 AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); 52 AlertCheckBox->setChecked(cfg.readBoolEntry("Alert"));
52 53
53 cfg.setGroup("Record"); 54 cfg.setGroup("Record");
54 int rate=config.readNumEntry("SampleRate", 22050); 55 int rate=config.readNumEntry("SampleRate", 22050);
55 if(rate == 8000) 56 if(rate == 8000)
56 sampleRate->setCurrentItem(0); 57 sampleRate->setCurrentItem(0);
57 else if(rate == 11025) 58 else if(rate == 11025)
58 sampleRate->setCurrentItem(1); 59 sampleRate->setCurrentItem(1);
59 else if(rate == 22050) 60 else if(rate == 22050)
60 sampleRate->setCurrentItem(2); 61 sampleRate->setCurrentItem(2);
61 else if(rate == 33075) 62 else if(rate == 33075)
62 sampleRate->setCurrentItem(3); 63 sampleRate->setCurrentItem(3);
63 else if(rate==44100) 64 else if(rate==44100)
64 sampleRate->setCurrentItem(4); 65 sampleRate->setCurrentItem(4);
65 66
66 stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only 67 stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only
67 68
68#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) //since ipaq and zaurus have particular 69#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) //since ipaq and zaurus have particular
69 //devices 70 //devices
70 bool systemZaurus=FALSE; 71 bool systemZaurus=FALSE;
71 struct utsname name; /* check for embedix kernel running on the zaurus*/ 72 struct utsname name; /* check for embedix kernel running on the zaurus*/
72 if (uname(&name) != -1) {// TODO change this here,... 73 if (uname(&name) != -1) {// TODO change this here,...
73 QString release=name.release; 74 QString release=name.release;
74 if( release.find("embedix",0,TRUE) != -1) { 75 if( release.find("embedix",0,TRUE) != -1) {
75 qDebug("IS System Zaurus"); 76 qDebug("IS System Zaurus");
76 systemZaurus=TRUE; 77 systemZaurus=TRUE;
77 } 78 }
78 } 79 }
79 if(!systemZaurus) { 80 if(!systemZaurus) {
80 stereoCheckBox->setChecked(TRUE); 81 stereoCheckBox->setChecked(TRUE);
81 } 82 }
82 stereoCheckBox->setEnabled(FALSE); 83 stereoCheckBox->setEnabled(FALSE);
83 sixteenBitCheckBox->setEnabled(FALSE); 84 sixteenBitCheckBox->setEnabled(FALSE);
84#else 85#else
85#endif 86#endif
86 int sRate=cfg.readNumEntry("SizeLimit", 30); 87 int sRate=cfg.readNumEntry("SizeLimit", 30);
87 qDebug("%d",sRate); 88 qDebug("%d",sRate);
88 89
89 if(sRate ==30) 90 if(sRate ==30)
90 timeLimitComboBox->setCurrentItem(0); 91 timeLimitComboBox->setCurrentItem(0);
91 else if(sRate==20) 92 else if(sRate==20)
92 timeLimitComboBox->setCurrentItem(1); 93 timeLimitComboBox->setCurrentItem(1);