summaryrefslogtreecommitdiff
path: root/noncore/settings/sound
authorllornkcor <llornkcor>2002-05-26 23:20:26 (UTC)
committer llornkcor <llornkcor>2002-05-26 23:20:26 (UTC)
commitf0d0d53759436686f7f15fcd55a6706b1ecaa1cc (patch) (side-by-side diff)
treee40e731fecf6c629799e6d264c47dc05528f21da /noncore/settings/sound
parent845ed24db904e0842f1557e185174c52d3d93092 (diff)
downloadopie-f0d0d53759436686f7f15fcd55a6706b1ecaa1cc.zip
opie-f0d0d53759436686f7f15fcd55a6706b1ecaa1cc.tar.gz
opie-f0d0d53759436686f7f15fcd55a6706b1ecaa1cc.tar.bz2
fixed location not remembering setting. added record key combo
Diffstat (limited to 'noncore/settings/sound') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp35
-rw-r--r--noncore/settings/sound/soundsettings.h2
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp30
-rw-r--r--noncore/settings/sound/soundsettingsbase.h3
4 files changed, 64 insertions, 6 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index 40b8b87..f417b79 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -37,2 +37,4 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
{
+ keyReset=FALSE;
+
Config config( "qpe");
@@ -63,3 +65,7 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
+ cfg.setGroup("Defaults");
+ keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") );
+
updateStorageCombo();
+
connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int)));
@@ -69,2 +75,3 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &)));
+ connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT(setKeyButton(const QString &)));
// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
@@ -159,2 +166,7 @@ void SoundSettings::updateStorageCombo() {
+ Config config( "Vmemo" );
+ config.setGroup( "System" );
+ QString loc = config.readEntry("RecLocation","/");
+int i=0;
+int set=0;
StorageInfo storageInfo;
@@ -169,5 +181,10 @@ void SoundSettings::updateStorageCombo() {
list << name + ": " +path;
+ if( loc.find( path,0,TRUE) != -1)
+ set = i;
// if(dit.current()->file().find(path) != -1 ) storage=name;
+ i++;
}
LocationComboBox->insertStringList(list);
+ qDebug("set item %d", set);
+ LocationComboBox->setCurrentItem(set);
}
@@ -178,3 +195,4 @@ void SoundSettings::setLocation(const QString & string) {
config.writeEntry("RecLocation",string);
-
+ qDebug("set location "+string);
+ config.write();
}
@@ -199,2 +217,17 @@ void SoundSettings::cleanUp() {
cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
+
+ if(keyReset) QCopEnvelope ("QPE/System", "restart()");
+
+}
+
+void SoundSettings::setKeyButton(const QString &name) {
+ Config cfg("Vmemo");
+ cfg.setGroup("Defaults");
+ cfg.writeEntry( "toggleKey", keyComboBox->currentItem() );
+ keyReset = TRUE;
+ cfg.write();
+}
+
+void SoundSettings::updateLocationCombo() {
+
}
diff --git a/noncore/settings/sound/soundsettings.h b/noncore/settings/sound/soundsettings.h
index cbec724..0676e12 100644
--- a/noncore/settings/sound/soundsettings.h
+++ b/noncore/settings/sound/soundsettings.h
@@ -37,4 +37,6 @@ protected:
void updateStorageCombo();
+ void updateLocationCombo();
private slots:
+ void setKeyButton(const QString &);
void setLocation(const QString &);
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp
index 727d202..6cb4f89 100644
--- a/noncore/settings/sound/soundsettingsbase.cpp
+++ b/noncore/settings/sound/soundsettingsbase.cpp
@@ -228,9 +228,33 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
TextLabel1 = new QLabel( privateLayoutWidget, "TextLabel1" );
- TextLabel1->setText( tr( "Location" ) );
+ TextLabel1->setText( tr( "Location:" ) );
Layout11->addWidget( TextLabel1 );
+
LocationComboBox = new QComboBox( FALSE, privateLayoutWidget, "LocationComboBox" );
Layout11->addWidget( LocationComboBox );
- Layout12_2->addWidget( GroupBox1 );
+ QLabel *TextLabelKey;
+ TextLabelKey = new QLabel( privateLayoutWidget, "TextLabelKey" );
+ TextLabelKey->setText( tr( "Record Key:" ) );
+
+ keyComboBox = new QComboBox( FALSE, privateLayoutWidget, "keyComboBox" );
+ keyComboBox->insertItem( tr( "" ) );
+ keyComboBox->insertItem( tr( "Taskbar Icon" ) );
+ keyComboBox->insertItem( tr( "Key_Escape" ) );
+ keyComboBox->insertItem( tr( "Key_Space" ) );
+ keyComboBox->insertItem( tr( "Key_Home" ) );
+ keyComboBox->insertItem( tr( "Key_Calender" ) );
+ keyComboBox->insertItem( tr( "Key_Contacts" ) );
+ keyComboBox->insertItem( tr( "Key_Menu" ) );
+ keyComboBox->insertItem( tr( "Key_Mail" ) );
+
+ Layout11->addWidget( TextLabelKey );
+
+ Layout11->addWidget( keyComboBox );
+
+ QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ Layout11->addItem( spacer_9 );
+
+
+ Layout12_2->addWidget( GroupBox1 );
// // touchsound = new QCheckBox( this, "touchsound" );
@@ -242,4 +266,2 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
// // Layout12_2->addWidget( keysound );
- QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
- Layout12_2->addItem( spacer_9 );
diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h
index 7a939ea..20d1c2c 100644
--- a/noncore/settings/sound/soundsettingsbase.h
+++ b/noncore/settings/sound/soundsettingsbase.h
@@ -49,3 +49,4 @@ public:
QComboBox* LocationComboBox;
-
+ QComboBox* keyComboBox;
+ bool keyReset;
protected: