summaryrefslogtreecommitdiff
path: root/noncore
authorllornkcor <llornkcor>2002-07-13 18:11:09 (UTC)
committer llornkcor <llornkcor>2002-07-13 18:11:09 (UTC)
commitc458ba7f91acf0eb84cb1e414f77dbde0581b905 (patch) (side-by-side diff)
tree637d7aceb0ce2717f7631c396c5fcdff73137d1f /noncore
parentf0421434c11a7781040340714fa01b6db2266a0b (diff)
downloadopie-c458ba7f91acf0eb84cb1e414f77dbde0581b905.zip
opie-c458ba7f91acf0eb84cb1e414f77dbde0581b905.tar.gz
opie-c458ba7f91acf0eb84cb1e414f77dbde0581b905.tar.bz2
remove volume controls as they are handled by volume applet, made into a more flexible layout
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp107
-rw-r--r--noncore/settings/sound/soundsettings.h5
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp201
-rw-r--r--noncore/settings/sound/soundsettingsbase.h23
4 files changed, 53 insertions, 283 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index a163d38..99fccf7 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -47,6 +47,2 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
config.setGroup( "Volume" );
- volume->setValue(100-config.readNumEntry("VolumePercent"));
- mic->setValue(100-config.readNumEntry("Mic"));
-// touchsound->setChecked(config.readBoolEntry("TouchSound"));
-// keysound->setChecked(config.readBoolEntry("KeySound"));
Config cfg("Vmemo");
@@ -102,3 +98,2 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
-
sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1));
@@ -109,8 +104,2 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
updateStorageCombo();
-
- connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int)));
- connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int)));
- connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) );
- connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) );
-
connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &)));
@@ -120,88 +109,2 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
}
-
-// void SoundSettings::reject()
-// {
-// qDebug("reject");
-// Config config( "qpe");
-// config.setGroup( "Volume");
-
-// setVolume(100-config.readNumEntry("VolumePercent"));
-// setMic(100-config.readNumEntry("Mic"));
-
-// // config.setGroup("Record");
-// // int rate=config.readNumEntry("SampleRate", 11025);
-// // if(rate == 11025)
-// // sampleRate->setCurrentItem(0);
-// // else if(rate == 22050)
-// // sampleRate->setCurrentItem(1);
-// // 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));
-// qDebug("QDialog::reject();");
-// ::exit(-1);
-// }
-
-// void SoundSettings::accept()
-// {
-// qDebug("accept");
-// Config config( "qpe" );
-// config.setGroup( "Volume" );
-// config.writeEntry("VolumePercent",100-volume->value());
-// config.writeEntry("Mic",100-mic->value());
-// // config.writeEntry("TouchSound",touchsound->isChecked());
-// // config.writeEntry("KeySound",keysound->isChecked());
-
-// Config cfg("Vmemo");
-// cfg.writeEntry("Alert",AlertCheckBox->isChecked());
-// setVolume(volume->value());
-// setMic(mic->value());
-
-// cfg.setGroup("Record");
-// 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());
-// qDebug("QDialog::accept();");
-// ::exit(0);
-// }
-
-void SoundSettings::setVolume(int v)
-{
- Config config( "qpe" );
- config.setGroup( "Volume" );
- config.writeEntry("VolumePercent",100-v);
-#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
- QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
-#endif
-}
-
-void SoundSettings::setMic(int m)
-{
- Config config( "qpe" );
- config.setGroup( "Volume" );
- config.writeEntry("Mic",100-m);
-#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
- QCopEnvelope( "QPE/System", "micChange(bool)" ) << FALSE;
-#endif
-}
-
-void SoundSettings::volumeChanged( bool )
-{
- Config config( "qpe" );
- config.setGroup( "Volume" );
- volume->setValue(100-config.readNumEntry("VolumePercent"));
-}
-
-void SoundSettings::micChanged( bool )
-{
- Config config( "qpe" );
- config.setGroup( "Volume" );
- mic->setValue(100-config.readNumEntry("Mic"));
-}
-
void SoundSettings::updateStorageCombo() {
@@ -246,14 +149,4 @@ void SoundSettings::setLocation(const QString & string) {
void SoundSettings::cleanUp() {
- qDebug("cleanup");
- Config config( "qpe" );
- config.setGroup( "Volume" );
- config.writeEntry("VolumePercent",100-volume->value());
- config.writeEntry("Mic",100-mic->value());
-// config.writeEntry("TouchSound",touchsound->isChecked());
-// config.writeEntry("KeySound",keysound->isChecked());
-
Config cfg("Vmemo");
cfg.writeEntry("Alert",AlertCheckBox->isChecked());
- setVolume(volume->value());
- setMic(mic->value());
diff --git a/noncore/settings/sound/soundsettings.h b/noncore/settings/sound/soundsettings.h
index 94d5d48..6b8b835 100644
--- a/noncore/settings/sound/soundsettings.h
+++ b/noncore/settings/sound/soundsettings.h
@@ -44,7 +44,2 @@ private slots:
void cleanUp();
- void setVolume(int);
- void setMic(int);
-
- void volumeChanged( bool muted );
- void micChanged( bool muted );
};
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp
index 8be1b3d..4c28ae9 100644
--- a/noncore/settings/sound/soundsettingsbase.cpp
+++ b/noncore/settings/sound/soundsettingsbase.cpp
@@ -85,3 +85,2 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
setName( "SoundSettingsBase" );
- resize( 255, 301 );
setCaption( tr( "Vmemo Settings" ) );
@@ -89,121 +88,25 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
SoundSettingsBaseLayout = new QGridLayout( this );
- SoundSettingsBaseLayout->setSpacing( 6 );
- SoundSettingsBaseLayout->setMargin( 11 );
+ SoundSettingsBaseLayout->setSpacing( 4 );
+ SoundSettingsBaseLayout->setMargin( 6 );
- GroupBox3 = new QGroupBox( this, "GroupBox3" );
- GroupBox3->setFrameShape( QGroupBox::Box );
- GroupBox3->setFrameShadow( QGroupBox::Sunken );
- 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 );
-
- Layout10 = new QVBoxLayout;
- Layout10->setSpacing( 2 );
- Layout10->setMargin( 2 );
-
- Layout16 = new QHBoxLayout;
- Layout16->setSpacing( 2 );
- Layout16->setMargin( 2 );
- 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 );
- Layout16->addWidget( PixmapLabel1_2 );
-
- TextLabel1_2 = new QLabel( GroupBox3, "TextLabel1_2" );
- TextLabel1_2->setText( tr( "Loud" ) );
- 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 );
-
- 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 );
-
- micLabel = new QLabel( GroupBox3, "micLabel" );
- micLabel->setText( tr( "Mic" ) );
- 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 );
-
- volume = new QSlider( GroupBox3, "volume" );
- volume->setMaxValue( 100 );
- volume->setValue( 50 );
- volume->setOrientation( QSlider::Vertical );
- volume->setTickmarks( QSlider::Right );
- volume->setTickInterval( 5 );
- Layout12->addWidget( volume );
- QSpacerItem* spacer_5 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout12->addItem( spacer_5 );
-
- mic = new QSlider( GroupBox3, "mic" );
- mic->setMaxValue( 100 );
- mic->setValue( 50 );
- mic->setOrientation( QSlider::Vertical );
- mic->setTickmarks( QSlider::Right );
- mic->setTickInterval( 5 );
- 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 );
- 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 );
- Layout17->addWidget( PixmapLabel2_2 );
-
- TextLabel2_2 = new QLabel( GroupBox3, "TextLabel2_2" );
- TextLabel2_2->setText( tr( "Silent" ) );
- Layout17->addWidget( TextLabel2_2 );
- QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout17->addItem( spacer_8 );
- Layout10->addLayout( Layout17 );
- GroupBox3Layout->addLayout( Layout10 );
-
- SoundSettingsBaseLayout->addWidget( GroupBox3, 0, 0 );
-
- Layout12_2 = new QVBoxLayout;
- Layout12_2->setSpacing( 2 );
- Layout12_2->setMargin( 2 );
-
- GroupBox1 = new QGroupBox( this, "GroupBox1" );
- GroupBox1->setTitle( tr( "Vmemo" ) );
+ stereoCheckBox = new QCheckBox( this, "stereoCheckBox" );
+ stereoCheckBox->setText( tr( "Stereo" ) );
+ SoundSettingsBaseLayout->addMultiCellWidget(stereoCheckBox , 0, 0, 0, 0 );
- QWidget* privateLayoutWidget = new QWidget( GroupBox1, "Layout11" );
- privateLayoutWidget->setGeometry( QRect( 5, 16, 96, 230 ) );
+ sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" );
+ sixteenBitCheckBox->setText( tr( "16 bit" ) );
+ SoundSettingsBaseLayout->addMultiCellWidget( sixteenBitCheckBox , 0, 0, 1, 1 );
- Layout11 = new QVBoxLayout( privateLayoutWidget );
- Layout11->setSpacing( 2 );
- Layout11->setMargin( 0 );
+ AlertCheckBox = new QCheckBox( this, "AlertCheckBox" );
+ AlertCheckBox->setText( tr( "Visual Alerts" ) );
+ SoundSettingsBaseLayout->addMultiCellWidget( AlertCheckBox , 0, 0, 2, 2 );
- sampleRateLabel = new QLabel( privateLayoutWidget, "sampleRateLabel" );
- sampleRateLabel->setText( tr( "Sample Rate" ) );
- Layout11->addWidget( sampleRateLabel );
+ QSpacerItem* spacer0 = new QSpacerItem( 20, 20,QSizePolicy::Expanding, QSizePolicy::Expanding );
+ SoundSettingsBaseLayout->addItem( spacer0, 0, 3 );
+
+ sampleRateLabel = new QLabel(this, "sampleRateLabel" );
+ sampleRateLabel->setText( tr( "Sample Rate:" ) );
+ SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0 );
- sampleRate = new QComboBox( FALSE, privateLayoutWidget, "sampleRate" );
+ sampleRate = new QComboBox( FALSE,this, "sampleRate" );
sampleRate->insertItem( tr( "8000" ) );
@@ -213,31 +116,25 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
sampleRate->insertItem( tr( "44100" ) );
- sampleRate->setFixedWidth(90);
- Layout11->addWidget( sampleRate );
-
- stereoCheckBox = new QCheckBox( privateLayoutWidget, "stereoCheckBox" );
- stereoCheckBox->setText( tr( "Stereo" ) );
- Layout11->addWidget( stereoCheckBox );
+// sampleRate->setFixedWidth(90);
+ SoundSettingsBaseLayout->addMultiCellWidget( sampleRate, 2, 2, 0, 2 );
- sixteenBitCheckBox = new QCheckBox( privateLayoutWidget, "sixteenBitCheckBox" );
- sixteenBitCheckBox->setText( tr( "16 bit" ) );
- Layout11->addWidget( sixteenBitCheckBox );
+// QSpacerItem* spacer = new QSpacerItem( 20, 20,QSizePolicy::Expanding, QSizePolicy::Expanding );
+// SoundSettingsBaseLayout->addItem( spacer, 1, 3 );
- AlertCheckBox = new QCheckBox( privateLayoutWidget, "AlertCheckBox" );
- AlertCheckBox->setText( tr( "Visual Alerts" ) );
- Layout11->addWidget( AlertCheckBox );
+ TextLabel1 = new QLabel( this, "TextLabel1" );
+ TextLabel1->setText( tr( "Recording Directory:" ) );
+ SoundSettingsBaseLayout->addMultiCellWidget( TextLabel1, 3, 3, 0, 0 );
- TextLabel1 = new QLabel( privateLayoutWidget, "TextLabel1" );
- TextLabel1->setText( tr( "Location:" ) );
- Layout11->addWidget( TextLabel1 );
+ LocationComboBox = new QComboBox( FALSE, this, "LocationComboBox" );
+ SoundSettingsBaseLayout->addMultiCellWidget( LocationComboBox, 4, 4, 0, 2 );
- LocationComboBox = new QComboBox( FALSE, privateLayoutWidget, "LocationComboBox" );
- Layout11->addWidget( LocationComboBox );
+// QSpacerItem* spacer1 = new QSpacerItem( 20, 20,QSizePolicy::Expanding, QSizePolicy::Expanding );
+// SoundSettingsBaseLayout->addItem( spacer1, 2, 3 );
QLabel *TextLabelKey;
- TextLabelKey = new QLabel( privateLayoutWidget, "TextLabelKey" );
- TextLabelKey->setText( tr( "Record Key:" ) );
- Layout11->addWidget( TextLabelKey );
+ TextLabelKey = new QLabel( this, "TextLabelKey" );
+ TextLabelKey->setText( tr( "Recording Key:" ) );
+ SoundSettingsBaseLayout->addMultiCellWidget(TextLabelKey , 5, 5, 0, 0 );
- keyComboBox = new QComboBox( FALSE, privateLayoutWidget, "keyComboBox" );
+ keyComboBox = new QComboBox( FALSE, this, "keyComboBox" );
keyComboBox->insertItem( tr( "" ) );
@@ -251,11 +148,13 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
keyComboBox->insertItem( tr( "Key_Mail" ) );
+ SoundSettingsBaseLayout->addMultiCellWidget( keyComboBox , 6, 6, 0, 2 );
- Layout11->addWidget( keyComboBox );
+// QSpacerItem* spacer2 = new QSpacerItem( 20, 20,QSizePolicy::Expanding, QSizePolicy::Expanding );
+// SoundSettingsBaseLayout->addItem( spacer2, 3, 3 );
QLabel *timeLimitLabel;
- timeLimitLabel= new QLabel( privateLayoutWidget, "timeLimitLabel" );
- timeLimitLabel->setText( tr( "Recording Limit:" ) );
- Layout11->addWidget( timeLimitLabel );
+ timeLimitLabel= new QLabel( this, "timeLimitLabel" );
+ timeLimitLabel->setText( tr( "Recording Limit in seconds:" ) );
+ SoundSettingsBaseLayout->addMultiCellWidget( timeLimitLabel , 7, 7, 0, 0 );
- timeLimitComboBox = new QComboBox( FALSE, privateLayoutWidget, "timeLimitComboBox" );
+ timeLimitComboBox = new QComboBox( FALSE, this, "timeLimitComboBox" );
timeLimitComboBox->insertItem( tr( "30" ) );
@@ -265,19 +164,11 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
timeLimitComboBox->insertItem( tr( "5" ) );
+ timeLimitComboBox->insertItem( tr( "Unlimited" ) );
- Layout11->addWidget(timeLimitComboBox);
- QLabel *timeLimitLabel2;
- timeLimitLabel2= new QLabel( privateLayoutWidget, "timeLimitLabel2" );
- timeLimitLabel2->setText( tr( "seconds" ) );
- Layout11->addWidget( timeLimitLabel2 );
-
- Layout12_2->addWidget( GroupBox1 );
-// // touchsound = new QCheckBox( this, "touchsound" );
-// // touchsound->setText( tr( "Screen sounds" ) );
-// // Layout12_2->addWidget( touchsound );
+ SoundSettingsBaseLayout->addMultiCellWidget(timeLimitComboBox , 8, 8, 0, 2);
-// // keysound = new QCheckBox( this, "keysound" );
-// // keysound->setText( tr( "Keyboard sounds" ) );
-// // Layout12_2->addWidget( keysound );
+// QSpacerItem* spacer3 = new QSpacerItem( 20, 20,QSizePolicy::Expanding, QSizePolicy::Expanding );
+// SoundSettingsBaseLayout->addItem( spacer3, 4, 3 );
- SoundSettingsBaseLayout->addLayout( Layout12_2, 0, 1 );
+ QSpacerItem* spacer4 = new QSpacerItem( 20, 20,QSizePolicy::Expanding, QSizePolicy::Expanding );
+ SoundSettingsBaseLayout->addItem( spacer4, 9, 0 );
}
diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h
index 5622b70..30f32ca 100644
--- a/noncore/settings/sound/soundsettingsbase.h
+++ b/noncore/settings/sound/soundsettingsbase.h
@@ -32,12 +32,11 @@ public:
- QGroupBox* GroupBox3;
QLabel* PixmapLabel1_2;
QLabel* TextLabel1_2;
- QLabel* volLabel;
- QLabel* micLabel;
- QSlider* volume;
- QSlider* mic;
- QLabel* PixmapLabel2_2;
- QLabel* TextLabel2_2;
- QGroupBox* GroupBox1;
+/* QLabel* volLabel; */
+/* QLabel* micLabel; */
+/* QSlider* volume; */
+/* QSlider* mic; */
+/* QLabel* PixmapLabel2_2; */
+/* QLabel* TextLabel2_2; */
+/* QGroupBox* GroupBox1; */
QLabel* sampleRateLabel;
@@ -54,10 +53,2 @@ protected:
QGridLayout* SoundSettingsBaseLayout;
- QVBoxLayout* GroupBox3Layout;
- QVBoxLayout* Layout10;
- QHBoxLayout* Layout16;
- QHBoxLayout* Layout13;
- QHBoxLayout* Layout12;
- QHBoxLayout* Layout17;
- QVBoxLayout* Layout12_2;
- QVBoxLayout* Layout11;
protected slots: