summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp79
-rw-r--r--noncore/settings/sound/soundsettings.h7
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp3
-rw-r--r--noncore/settings/sound/soundsettingsbase.h5
4 files changed, 55 insertions, 39 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index d55a751..df3def5 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -45,5 +45,5 @@ using namespace Opie::Core;
SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
- : SoundSettingsBase( parent, objname, TRUE, fl )
+ : SoundSettingsBase( parent, objname, true, fl )
{
- keyReset=FALSE;
+ keyReset=false;
noWarning=false;
@@ -52,4 +52,7 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
Config cfg("Vmemo");
- connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
- AlertCheckBox->setChecked(cfg.readBoolEntry("Alert"));
+
+
+// connect(qApp,SIGNAL(aboutToQuit()),SLOT(cleanUp()));
+
+ AlertCheckBox->setChecked( cfg.readBoolEntry("Alert", 1));
@@ -74,3 +77,3 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
//devices
- bool systemZaurus=FALSE;
+ bool systemZaurus=false;
struct utsname name; /* check for embedix kernel running on the zaurus*/
@@ -78,5 +81,5 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
QString release=name.release;
- if( release.find("embedix",0,TRUE) != -1) {
+ if( release.find("embedix",0,true) != -1) {
odebug << "IS System Zaurus" << oendl;
- systemZaurus=TRUE;
+ systemZaurus=true;
}
@@ -84,6 +87,6 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
if(!systemZaurus) {
- stereoCheckBox->setChecked(TRUE);
+ stereoCheckBox->setChecked(true);
}
- stereoCheckBox->setEnabled(FALSE);
- sixteenBitCheckBox->setEnabled(FALSE);
+ stereoCheckBox->setEnabled(false);
+ sixteenBitCheckBox->setEnabled(false);
#else
@@ -93,5 +96,5 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
- if(sRate ==30)
+ if(sRate == 30)
timeLimitComboBox->setCurrentItem(0);
- else if(sRate==20)
+ else if(sRate == 20)
timeLimitComboBox->setCurrentItem(1);
@@ -109,3 +112,4 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
cfg.setGroup("Defaults");
- keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") );
+ recordKey = cfg.readNumEntry("toggleKey");
+ keyComboBox->setCurrentItem( recordKey);
@@ -117,12 +121,7 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
- connect( LocationComboBox,SIGNAL(activated(const QString&)), this,
- SLOT( setLocation(const QString&)));
- connect( keyComboBox,SIGNAL(activated(int)), this,
- SLOT( setKeyButton(int)));
- connect( timeLimitComboBox,SIGNAL(activated(const QString&)), this,
- SLOT( setSizeLimitButton(const QString&)));
- connect( restartCheckBox,SIGNAL( toggled(bool)), this,
- SLOT( restartOpie(bool)));
- connect( adpcmCheckBox,SIGNAL( toggled(bool)), this,
- SLOT( slotAdpcm(bool)));
+ connect(LocationComboBox,SIGNAL(activated(const QString&)),this,SLOT(setLocation(const QString&)));
+ connect(keyComboBox,SIGNAL(activated(int)),this,SLOT(setKeyButton(int)));
+ connect(timeLimitComboBox,SIGNAL(activated(const QString&)),this,SLOT(setSizeLimitButton(const QString&)));
+ connect(restartCheckBox,SIGNAL( toggled(bool)),this,SLOT(restartOpie(bool)));
+ connect(adpcmCheckBox,SIGNAL( toggled(bool)),this,SLOT(slotAdpcm(bool)));
@@ -136,4 +135,4 @@ void SoundSettings::updateStorageCombo() {
QString loc = config.readEntry("RecLocation","/");
- int i=0;
- int set=0;
+ int i = 0;
+ int set = 0;
StorageInfo storageInfo;
@@ -151,3 +150,3 @@ void SoundSettings::updateStorageCombo() {
list << name + ": " +path;
- if( loc.find( path,0,TRUE) != -1)
+ if( loc.find( path,0,true) != -1)
set = i;
@@ -170,3 +169,10 @@ void SoundSettings::setLocation(const QString & string) {
+ void SoundSettings::accept() {
+ cleanUp();
+ qApp->quit();
+}
+
+
void SoundSettings::cleanUp() {
+
Config cfg("Vmemo");
@@ -181,2 +187,11 @@ void SoundSettings::cleanUp() {
}
+ cfg.setGroup("Defaults");
+ cfg.writeEntry( "toggleKey", recordKey);
+ if( recordKey == 1) {
+ cfg.writeEntry( "hideIcon", 0 );
+ }
+ else {
+ cfg.writeEntry( "hideIcon", 1);
+ }
+ cfg.write();
}
@@ -184,8 +199,6 @@ void SoundSettings::cleanUp() {
void SoundSettings::setKeyButton( int index) {
- Config cfg("Vmemo");
- cfg.setGroup("Defaults");
- cfg.writeEntry( "toggleKey", index );
- keyReset = TRUE;
+ recordKey = index;
+ restartCheckBox->setChecked(true);
+ keyReset = true;
if( index == 1) {
- cfg.writeEntry( "hideIcon", 0 );
keyLabel->setText(tr("Shows icon"));
@@ -193,6 +206,4 @@ void SoundSettings::setKeyButton( int index) {
else {
- cfg.writeEntry( "hideIcon", 1);
keyLabel->setText(tr("Hides icon"));
}
- cfg.write();
}
@@ -207,3 +218,3 @@ void SoundSettings::setSizeLimitButton(const QString &index) {
cfg.setGroup("Record");
- if(index.find("Unlimited",0,TRUE) != -1)
+ if(index.find("Unlimited",0,true) != -1)
cfg.writeEntry("SizeLimit", -1);
diff --git a/noncore/settings/sound/soundsettings.h b/noncore/settings/sound/soundsettings.h
index 57a360f..9db664a 100644
--- a/noncore/settings/sound/soundsettings.h
+++ b/noncore/settings/sound/soundsettings.h
@@ -33,6 +33,8 @@ public:
SoundSettings( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+// ~SoundSettings();
protected:
- bool noWarning;
-/* void accept(); */
+ int recordKey, hideIt;
+ bool noWarning;
+ void accept();
/* void reject(); */
@@ -42,2 +44,3 @@ protected:
private slots:
+//void closeEvent(QCloseEvent * );
void setKeyButton( int);
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp
index 84187d2..2d894c6 100644
--- a/noncore/settings/sound/soundsettingsbase.cpp
+++ b/noncore/settings/sound/soundsettingsbase.cpp
@@ -70,3 +70,4 @@ static const char* const image1_data[] = {
SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl )
- : QMainWindow( parent, name, fl )
+ : QDialog( parent, name, fl )
+// : QMainWindow( parent, name, fl )
{
diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h
index 48c31e8..0234925 100644
--- a/noncore/settings/sound/soundsettingsbase.h
+++ b/noncore/settings/sound/soundsettingsbase.h
@@ -13,3 +13,3 @@
#include <qdialog.h>
-#include <qmainwindow.h>
+//#include <qmainwindow.h>
@@ -24,3 +24,4 @@ class QSlider;
-class SoundSettingsBase : public QMainWindow
+class SoundSettingsBase : public QDialog
+//class SoundSettingsBase : public QMainWindow
{