summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-05-23 17:32:43 (UTC)
committer llornkcor <llornkcor>2002-05-23 17:32:43 (UTC)
commit486ad124967306e4a65a63f9d4bf60ea1ba38544 (patch) (side-by-side diff)
tree49077ef16f1abd0658beb6cfa06aa070e53fc21d
parent68e6e7801c5540dda00bda44222dce3e69075cc9 (diff)
downloadopie-486ad124967306e4a65a63f9d4bf60ea1ba38544.zip
opie-486ad124967306e4a65a63f9d4bf60ea1ba38544.tar.gz
opie-486ad124967306e4a65a63f9d4bf60ea1ba38544.tar.bz2
changed from QDialog, with its crappy way of closing in qpe to QMainWindow
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp8
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp56
-rw-r--r--noncore/settings/sound/soundsettingsbase.h6
3 files changed, 35 insertions, 35 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index cdee87c..ed601cf 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -67,12 +67,13 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &)));
// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
}
void SoundSettings::reject()
{
+ qDebug("here");
Config config( "qpe");
config.setGroup( "Volume");
setVolume(100-config.readNumEntry("VolumePercent"));
setMic(100-config.readNumEntry("Mic"));
@@ -85,14 +86,14 @@ void SoundSettings::reject()
// else if(rate == 32000)
// sampleRate->setCurrentItem(2);
// else if(rate==44100)
// sampleRate->setCurrentItem(3);
// stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0));
// sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0));
-
- QDialog::reject();
+ ::exit(-1);
+// QDialog::reject();
}
void SoundSettings::accept()
{
Config config( "qpe" );
config.setGroup( "Volume" );
@@ -110,13 +111,14 @@ void SoundSettings::accept()
cfg.writeEntry("SampleRate",sampleRate->currentText());
cfg.writeEntry("Stereo",stereoCheckBox->isChecked());
cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
// Config cfg( "VMemo" );
// cfg.setGroup( "Defaults" );
// cfg.writeEntry( "hideIcon", HideIcon_CheckBox->isChecked());
- QDialog::accept();
+// QDialog::accept();
+ ::exit(0);
}
void SoundSettings::setVolume(int v)
{
Config config( "qpe" );
config.setGroup( "Volume" );
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp
index 937b068..563b438 100644
--- a/noncore/settings/sound/soundsettingsbase.cpp
+++ b/noncore/settings/sound/soundsettingsbase.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
** Form implementation generated from reading ui file 'soundsettingsbase.ui'
**
-** Created: Sun May 19 12:11:35 2002
+** Created: Thu May 23 11:23:54 2002
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "soundsettingsbase.h"
@@ -76,15 +76,15 @@ static const char* const image1_data[] = {
SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
QPixmap image0( ( const char** ) image0_data );
QPixmap image1( ( const char** ) image1_data );
if ( !name )
- setName( "SoundSettingsBase" );
+ setName( "SoundSettingsBase" );
resize( 255, 301 );
- setCaption( tr( "Vmemo Settings" ) );
+ setCaption( tr( "Sound Settings" ) );
SoundSettingsBaseLayout = new QGridLayout( this );
SoundSettingsBaseLayout->setSpacing( 6 );
SoundSettingsBaseLayout->setMargin( 11 );
GroupBox3 = new QGroupBox( this, "GroupBox3" );
GroupBox3->setFrameShape( QGroupBox::Box );
@@ -92,22 +92,22 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
GroupBox3->setTitle( tr( "Levels" ) );
GroupBox3->setColumnLayout(0, Qt::Vertical );
GroupBox3->layout()->setSpacing( 0 );
GroupBox3->layout()->setMargin( 0 );
GroupBox3Layout = new QVBoxLayout( GroupBox3->layout() );
GroupBox3Layout->setAlignment( Qt::AlignTop );
- GroupBox3Layout->setSpacing( 2 );
- GroupBox3Layout->setMargin( 2 );
+ GroupBox3Layout->setSpacing( 6 );
+ GroupBox3Layout->setMargin( 11 );
Layout10 = new QVBoxLayout;
- Layout10->setSpacing( 2 );
- Layout10->setMargin( 2 );
+ Layout10->setSpacing( 6 );
+ Layout10->setMargin( 0 );
Layout16 = new QHBoxLayout;
- Layout16->setSpacing( 2 );
- Layout16->setMargin( 2 );
+ Layout16->setSpacing( 6 );
+ Layout16->setMargin( 0 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout16->addItem( spacer );
PixmapLabel1_2 = new QLabel( GroupBox3, "PixmapLabel1_2" );
PixmapLabel1_2->setPixmap( image0 );
PixmapLabel1_2->setScaledContents( FALSE );
@@ -118,14 +118,14 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
Layout16->addWidget( TextLabel1_2 );
QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout16->addItem( spacer_2 );
Layout10->addLayout( Layout16 );
Layout13 = new QHBoxLayout;
- Layout13->setSpacing( 2 );
- Layout13->setMargin( 2 );
+ Layout13->setSpacing( 6 );
+ Layout13->setMargin( 0 );
volLabel = new QLabel( GroupBox3, "volLabel" );
volLabel->setText( tr( "Output" ) );
Layout13->addWidget( volLabel );
QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout13->addItem( spacer_3 );
@@ -135,14 +135,14 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
Layout13->addWidget( micLabel );
QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout13->addItem( spacer_4 );
Layout10->addLayout( Layout13 );
Layout12 = new QHBoxLayout;
- Layout12->setSpacing( 2 );
- Layout12->setMargin( 2 );
+ Layout12->setSpacing( 6 );
+ Layout12->setMargin( 0 );
volume = new QSlider( GroupBox3, "volume" );
volume->setMaxValue( 100 );
volume->setValue( 50 );
volume->setOrientation( QSlider::Vertical );
volume->setTickmarks( QSlider::Right );
@@ -160,14 +160,14 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
Layout12->addWidget( mic );
QSpacerItem* spacer_6 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout12->addItem( spacer_6 );
Layout10->addLayout( Layout12 );
Layout17 = new QHBoxLayout;
- Layout17->setSpacing( 2 );
- Layout17->setMargin( 2 );
+ Layout17->setSpacing( 6 );
+ Layout17->setMargin( 0 );
QSpacerItem* spacer_7 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout17->addItem( spacer_7 );
PixmapLabel2_2 = new QLabel( GroupBox3, "PixmapLabel2_2" );
PixmapLabel2_2->setPixmap( image1 );
PixmapLabel2_2->setScaledContents( FALSE );
@@ -181,35 +181,33 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
Layout10->addLayout( Layout17 );
GroupBox3Layout->addLayout( Layout10 );
SoundSettingsBaseLayout->addWidget( GroupBox3, 0, 0 );
Layout12_2 = new QVBoxLayout;
- Layout12_2->setSpacing( 2 );
- Layout12_2->setMargin( 2 );
+ Layout12_2->setSpacing( 6 );
+ Layout12_2->setMargin( 0 );
GroupBox1 = new QGroupBox( this, "GroupBox1" );
GroupBox1->setTitle( tr( "Vmemo" ) );
QWidget* privateLayoutWidget = new QWidget( GroupBox1, "Layout11" );
privateLayoutWidget->setGeometry( QRect( 5, 16, 96, 169 ) );
Layout11 = new QVBoxLayout( privateLayoutWidget );
- Layout11->setSpacing( 2 );
+ Layout11->setSpacing( 6 );
Layout11->setMargin( 0 );
sampleRateLabel = new QLabel( privateLayoutWidget, "sampleRateLabel" );
sampleRateLabel->setText( tr( "Sample Rate" ) );
Layout11->addWidget( sampleRateLabel );
sampleRate = new QComboBox( FALSE, privateLayoutWidget, "sampleRate" );
- sampleRate->insertItem( tr( "8000" ) );
sampleRate->insertItem( tr( "11025" ) );
sampleRate->insertItem( tr( "22050" ) );
- sampleRate->insertItem( tr( "33075" ) );
+ sampleRate->insertItem( tr( "32000" ) );
sampleRate->insertItem( tr( "44100" ) );
- sampleRate->setFixedWidth(90);
Layout11->addWidget( sampleRate );
stereoCheckBox = new QCheckBox( privateLayoutWidget, "stereoCheckBox" );
stereoCheckBox->setText( tr( "Stereo" ) );
Layout11->addWidget( stereoCheckBox );
@@ -226,21 +224,21 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
Layout11->addWidget( TextLabel1 );
LocationComboBox = new QComboBox( FALSE, privateLayoutWidget, "LocationComboBox" );
Layout11->addWidget( LocationComboBox );
Layout12_2->addWidget( GroupBox1 );
-// // touchsound = new QCheckBox( this, "touchsound" );
-// // touchsound->setText( tr( "Screen sounds" ) );
-// // Layout12_2->addWidget( touchsound );
+ touchsound = new QCheckBox( this, "touchsound" );
+ touchsound->setText( tr( "Screen sounds" ) );
+ Layout12_2->addWidget( touchsound );
-// // keysound = new QCheckBox( this, "keysound" );
-// // keysound->setText( tr( "Keyboard sounds" ) );
-// // Layout12_2->addWidget( keysound );
- QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
- Layout12_2->addItem( spacer_9 );
+ keysound = new QCheckBox( this, "keysound" );
+ keysound->setText( tr( "Keyboard sounds" ) );
+ Layout12_2->addWidget( keysound );
+ QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ Layout12_2->addItem( spacer_9 );
SoundSettingsBaseLayout->addLayout( Layout12_2, 0, 1 );
}
/*
* Destroys the object and frees any allocated resources
diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h
index 8ad80f6..66ba34a 100644
--- a/noncore/settings/sound/soundsettingsbase.h
+++ b/noncore/settings/sound/soundsettingsbase.h
@@ -1,10 +1,10 @@
/****************************************************************************
** Form interface generated from reading ui file 'soundsettingsbase.ui'
**
-** Created: Sun May 19 12:11:23 2002
+** Created: Thu May 23 11:23:38 2002
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef SOUNDSETTINGSBASE_H
#define SOUNDSETTINGSBASE_H
@@ -42,14 +42,14 @@ public:
QComboBox* sampleRate;
QCheckBox* stereoCheckBox;
QCheckBox* sixteenBitCheckBox;
QCheckBox* AlertCheckBox;
QLabel* TextLabel1;
QComboBox* LocationComboBox;
-/* QCheckBox* touchsound; */
-/* QCheckBox* keysound; */
+ QCheckBox* touchsound;
+ QCheckBox* keysound;
protected:
QGridLayout* SoundSettingsBaseLayout;
QVBoxLayout* GroupBox3Layout;
QVBoxLayout* Layout10;
QHBoxLayout* Layout16;