summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-06-22 23:03:32 (UTC)
committer llornkcor <llornkcor>2002-06-22 23:03:32 (UTC)
commitc015dff8a9e3aec56117349bb58f6d1bf1a7eb4a (patch) (unidiff)
tree2a83ddfd30bf8133df28ce0b353b617c8ef9a9ad
parentb6f6bab5e56f352a4f71dadb40530d6cdcaea3cc (diff)
downloadopie-c015dff8a9e3aec56117349bb58f6d1bf1a7eb4a.zip
opie-c015dff8a9e3aec56117349bb58f6d1bf1a7eb4a.tar.gz
opie-c015dff8a9e3aec56117349bb58f6d1bf1a7eb4a.tar.bz2
fix
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 75a707b..b490072 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -28,96 +28,97 @@
28#include <qapplication.h> 28#include <qapplication.h>
29#include <qslider.h> 29#include <qslider.h>
30#include <qcheckbox.h> 30#include <qcheckbox.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qcombobox.h> 32#include <qcombobox.h>
33 33
34#include <sys/utsname.h> 34#include <sys/utsname.h>
35#include <sys/time.h> 35#include <sys/time.h>
36#include <sys/types.h> 36#include <sys/types.h>
37#include <unistd.h> 37#include <unistd.h>
38#include <stdio.h> 38#include <stdio.h>
39#include <sys/stat.h> 39#include <sys/stat.h>
40 40
41SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl ) 41SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
42 : SoundSettingsBase( parent, name, TRUE, fl ) 42 : SoundSettingsBase( parent, name, TRUE, fl )
43{ 43{
44 keyReset=FALSE; 44 keyReset=FALSE;
45 45
46 Config config( "qpe"); 46 Config config( "qpe");
47 config.setGroup( "Volume" ); 47 config.setGroup( "Volume" );
48 volume->setValue(100-config.readNumEntry("VolumePercent")); 48 volume->setValue(100-config.readNumEntry("VolumePercent"));
49 mic->setValue(100-config.readNumEntry("Mic")); 49 mic->setValue(100-config.readNumEntry("Mic"));
50// touchsound->setChecked(config.readBoolEntry("TouchSound")); 50// touchsound->setChecked(config.readBoolEntry("TouchSound"));
51// keysound->setChecked(config.readBoolEntry("KeySound")); 51// keysound->setChecked(config.readBoolEntry("KeySound"));
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)); //TODO hide if zaurus- mono only 69 stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only
70 struct utsname name; /* check for embedix kernel running on the zaurus*/ 70 struct utsname name; /* check for embedix kernel running on the zaurus*/
71 if (uname(&name) != -1) { 71 if (uname(&name) != -1) {
72 QString release=name.release; 72 QString release=name.release;
73 73
74 if( release.find("embedix",0,TRUE) !=-1) 74 if( release.find("embedix",0,TRUE) !=-1)
75 stereoCheckBox->hide(); 75 stereoCheckBox->hide();
76 }
76// else 77// else
77// stereoCheckBox->hide(); 78// stereoCheckBox->hide();
78 79
79 80
80 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); 81 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1));
81 82
82 cfg.setGroup("Defaults"); 83 cfg.setGroup("Defaults");
83 keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); 84 keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") );
84 85
85 updateStorageCombo(); 86 updateStorageCombo();
86 87
87 connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); 88 connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int)));
88 connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int))); 89 connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int)));
89 connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) ); 90 connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) );
90 connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) ); 91 connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) );
91 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); 92 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &)));
92 connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT(setKeyButton(const QString &))); 93 connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT(setKeyButton(const QString &)));
93// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 94// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
94} 95}
95 96
96// void SoundSettings::reject() 97// void SoundSettings::reject()
97// { 98// {
98// qDebug("reject"); 99// qDebug("reject");
99// Config config( "qpe"); 100// Config config( "qpe");
100// config.setGroup( "Volume"); 101// config.setGroup( "Volume");
101 102
102// setVolume(100-config.readNumEntry("VolumePercent")); 103// setVolume(100-config.readNumEntry("VolumePercent"));
103// setMic(100-config.readNumEntry("Mic")); 104// setMic(100-config.readNumEntry("Mic"));
104 105
105// // config.setGroup("Record"); 106// // config.setGroup("Record");
106// // int rate=config.readNumEntry("SampleRate", 11025); 107// // int rate=config.readNumEntry("SampleRate", 11025);
107// // if(rate == 11025) 108// // if(rate == 11025)
108// // sampleRate->setCurrentItem(0); 109// // sampleRate->setCurrentItem(0);
109// // else if(rate == 22050) 110// // else if(rate == 22050)
110// // sampleRate->setCurrentItem(1); 111// // sampleRate->setCurrentItem(1);
111// // else if(rate == 32000) 112// // else if(rate == 32000)
112// // sampleRate->setCurrentItem(2); 113// // sampleRate->setCurrentItem(2);
113// // else if(rate==44100) 114// // else if(rate==44100)
114// // sampleRate->setCurrentItem(3); 115// // sampleRate->setCurrentItem(3);
115// // stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0)); 116// // stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0));
116// // sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0)); 117// // sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0));
117// qDebug("QDialog::reject();"); 118// qDebug("QDialog::reject();");
118// ::exit(-1); 119// ::exit(-1);
119// } 120// }
120 121
121// void SoundSettings::accept() 122// void SoundSettings::accept()
122// { 123// {
123// qDebug("accept"); 124// qDebug("accept");