Diffstat (limited to 'noncore/settings/sound/soundsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index 672548f..3ceaf0c 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp | |||
@@ -67,39 +67,52 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) | |||
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); | ||
80 | if(sRate ==30) | ||
81 | timeLimitComboBox->setCurrentItem(0); | ||
82 | else if(sRate==20) | ||
83 | timeLimitComboBox->setCurrentItem(1); | ||
84 | else if(sRate == 15) | ||
85 | timeLimitComboBox->setCurrentItem(2); | ||
86 | else if(sRate == 10) | ||
87 | |||
88 | timeLimitComboBox->setCurrentItem(3); | ||
89 | else | ||
90 | timeLimitComboBox->setCurrentItem(4); | ||
79 | 91 | ||
80 | 92 | ||
81 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); | 93 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); |
82 | 94 | ||
83 | cfg.setGroup("Defaults"); | 95 | cfg.setGroup("Defaults"); |
84 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); | 96 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); |
85 | 97 | ||
86 | updateStorageCombo(); | 98 | updateStorageCombo(); |
87 | 99 | ||
88 | connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); | 100 | connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); |
89 | connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int))); | 101 | connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int))); |
90 | connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) ); | 102 | connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) ); |
91 | connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) ); | 103 | connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) ); |
92 | connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); | 104 | connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); |
93 | connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT(setKeyButton(const QString &))); | 105 | connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT(setKeyButton(const QString &))); |
106 | connect( timeLimitComboBox,SIGNAL(activated( const QString &)),this,SLOT(setSizeLimitButton(const QString &))); | ||
94 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 107 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
95 | } | 108 | } |
96 | 109 | ||
97 | // void SoundSettings::reject() | 110 | // void SoundSettings::reject() |
98 | // { | 111 | // { |
99 | // qDebug("reject"); | 112 | // qDebug("reject"); |
100 | // Config config( "qpe"); | 113 | // Config config( "qpe"); |
101 | // config.setGroup( "Volume"); | 114 | // config.setGroup( "Volume"); |
102 | 115 | ||
103 | // setVolume(100-config.readNumEntry("VolumePercent")); | 116 | // setVolume(100-config.readNumEntry("VolumePercent")); |
104 | // setMic(100-config.readNumEntry("Mic")); | 117 | // setMic(100-config.readNumEntry("Mic")); |
105 | 118 | ||
@@ -239,12 +252,20 @@ void SoundSettings::cleanUp() { | |||
239 | 252 | ||
240 | void SoundSettings::setKeyButton(const QString &name) { | 253 | void SoundSettings::setKeyButton(const QString &name) { |
241 | Config cfg("Vmemo"); | 254 | Config cfg("Vmemo"); |
242 | cfg.setGroup("Defaults"); | 255 | cfg.setGroup("Defaults"); |
243 | cfg.writeEntry( "toggleKey", keyComboBox->currentItem() ); | 256 | cfg.writeEntry( "toggleKey", keyComboBox->currentItem() ); |
244 | keyReset = TRUE; | 257 | keyReset = TRUE; |
245 | cfg.write(); | 258 | cfg.write(); |
246 | } | 259 | } |
247 | 260 | ||
248 | void SoundSettings::updateLocationCombo() { | 261 | void SoundSettings::updateLocationCombo() { |
249 | 262 | ||
250 | } | 263 | } |
264 | |||
265 | void SoundSettings::setSizeLimitButton(const QString &index) { | ||
266 | |||
267 | Config cfg("Vmemo"); | ||
268 | cfg.setGroup("Record"); | ||
269 | cfg.writeEntry("SizeLimit", index); | ||
270 | cfg.write(); | ||
271 | } | ||