summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index 3ceaf0c..759a469 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -31,105 +31,106 @@
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* objname, WFlags fl ) 41SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
42 : SoundSettingsBase( parent, objname, TRUE, fl ) 42 : SoundSettingsBase( parent, objname, 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 }
77// else 77// else
78// stereoCheckBox->hide(); 78// stereoCheckBox->hide();
79 int sRate=config.readNumEntry("SizeLimit", 30); 79 int sRate=cfg.readNumEntry("SizeLimit", 30);
80 qDebug("%d",sRate);
81
80 if(sRate ==30) 82 if(sRate ==30)
81 timeLimitComboBox->setCurrentItem(0); 83 timeLimitComboBox->setCurrentItem(0);
82 else if(sRate==20) 84 else if(sRate==20)
83 timeLimitComboBox->setCurrentItem(1); 85 timeLimitComboBox->setCurrentItem(1);
84 else if(sRate == 15) 86 else if(sRate == 15)
85 timeLimitComboBox->setCurrentItem(2); 87 timeLimitComboBox->setCurrentItem(2);
86 else if(sRate == 10) 88 else if(sRate == 10)
87
88 timeLimitComboBox->setCurrentItem(3); 89 timeLimitComboBox->setCurrentItem(3);
89 else 90 else
90 timeLimitComboBox->setCurrentItem(4); 91 timeLimitComboBox->setCurrentItem(4);
91 92
92 93
93 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); 94 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1));
94 95
95 cfg.setGroup("Defaults"); 96 cfg.setGroup("Defaults");
96 keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); 97 keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") );
97 98
98 updateStorageCombo(); 99 updateStorageCombo();
99 100
100 connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); 101 connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int)));
101 connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int))); 102 connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int)));
102 connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) ); 103 connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) );
103 connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) ); 104 connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) );
104 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); 105 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &)));
105 connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT(setKeyButton(const QString &))); 106 connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT(setKeyButton(const QString &)));
106 connect( timeLimitComboBox,SIGNAL(activated( const QString &)),this,SLOT(setSizeLimitButton(const QString &))); 107 connect( timeLimitComboBox,SIGNAL(activated( const QString &)),this,SLOT(setSizeLimitButton(const QString &)));
107// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 108// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
108} 109}
109 110
110// void SoundSettings::reject() 111// void SoundSettings::reject()
111// { 112// {
112// qDebug("reject"); 113// qDebug("reject");
113// Config config( "qpe"); 114// Config config( "qpe");
114// config.setGroup( "Volume"); 115// config.setGroup( "Volume");
115 116
116// setVolume(100-config.readNumEntry("VolumePercent")); 117// setVolume(100-config.readNumEntry("VolumePercent"));
117// setMic(100-config.readNumEntry("Mic")); 118// setMic(100-config.readNumEntry("Mic"));
118 119
119// // config.setGroup("Record"); 120// // config.setGroup("Record");
120// // int rate=config.readNumEntry("SampleRate", 11025); 121// // int rate=config.readNumEntry("SampleRate", 11025);
121// // if(rate == 11025) 122// // if(rate == 11025)
122// // sampleRate->setCurrentItem(0); 123// // sampleRate->setCurrentItem(0);
123// // else if(rate == 22050) 124// // else if(rate == 22050)
124// // sampleRate->setCurrentItem(1); 125// // sampleRate->setCurrentItem(1);
125// // else if(rate == 32000) 126// // else if(rate == 32000)
126// // sampleRate->setCurrentItem(2); 127// // sampleRate->setCurrentItem(2);
127// // else if(rate==44100) 128// // else if(rate==44100)
128// // sampleRate->setCurrentItem(3); 129// // sampleRate->setCurrentItem(3);
129// // stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0)); 130// // stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0));
130// // sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0)); 131// // sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0));
131// qDebug("QDialog::reject();"); 132// qDebug("QDialog::reject();");
132// ::exit(-1); 133// ::exit(-1);
133// } 134// }
134 135
135// void SoundSettings::accept() 136// void SoundSettings::accept()