author | llornkcor <llornkcor> | 2002-06-23 18:33:17 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-23 18:33:17 (UTC) |
commit | b50f663aabaf51821a35a94354237a3387954e79 (patch) (side-by-side diff) | |
tree | c2dc2879fc7d6964aea4201995927e967f3bade3 | |
parent | f0e656b51a2dcee1dec594636cbc1ba8d4b11eef (diff) | |
download | opie-b50f663aabaf51821a35a94354237a3387954e79.zip opie-b50f663aabaf51821a35a94354237a3387954e79.tar.gz opie-b50f663aabaf51821a35a94354237a3387954e79.tar.bz2 |
added recording time limit
-rw-r--r-- | noncore/settings/sound/sound.pro | 2 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 21 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettings.h | 1 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.cpp | 26 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.h | 1 |
5 files changed, 44 insertions, 7 deletions
diff --git a/noncore/settings/sound/sound.pro b/noncore/settings/sound/sound.pro index 28c8b0d..a5c6cea 100644 --- a/noncore/settings/sound/sound.pro +++ b/noncore/settings/sound/sound.pro @@ -2,13 +2,13 @@ TEMPLATE = app CONFIG += qt warn_on release DESTDIR = $(OPIEDIR)/bin HEADERS = soundsettings.h soundsettingsbase.h SOURCES = soundsettings.cpp soundsettingsbase.cpp main.cpp #INTERFACES = soundsettingsbase.ui INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += ../$(OPIEDIR)/include +DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe TARGET = sound TRANSLATIONS = ../../i18n/pt_BR/sound.ts TRANSLATIONS += ../../i18n/es/sound.ts TRANSLATIONS += ../../i18n/pt/sound.ts 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 @@ -73,12 +73,24 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) if( release.find("embedix",0,TRUE) !=-1) stereoCheckBox->hide(); } // else // stereoCheckBox->hide(); + int sRate=config.readNumEntry("SizeLimit", 30); + if(sRate ==30) + timeLimitComboBox->setCurrentItem(0); + else if(sRate==20) + timeLimitComboBox->setCurrentItem(1); + else if(sRate == 15) + timeLimitComboBox->setCurrentItem(2); + else if(sRate == 10) + + timeLimitComboBox->setCurrentItem(3); + else + timeLimitComboBox->setCurrentItem(4); sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); cfg.setGroup("Defaults"); keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); @@ -88,12 +100,13 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) 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 &))); connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT(setKeyButton(const QString &))); + connect( timeLimitComboBox,SIGNAL(activated( const QString &)),this,SLOT(setSizeLimitButton(const QString &))); // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); } // void SoundSettings::reject() // { // qDebug("reject"); @@ -245,6 +258,14 @@ void SoundSettings::setKeyButton(const QString &name) { cfg.write(); } void SoundSettings::updateLocationCombo() { } + +void SoundSettings::setSizeLimitButton(const QString &index) { + + Config cfg("Vmemo"); + cfg.setGroup("Record"); + cfg.writeEntry("SizeLimit", index); + cfg.write(); +} diff --git a/noncore/settings/sound/soundsettings.h b/noncore/settings/sound/soundsettings.h index 0676e12..94d5d48 100644 --- a/noncore/settings/sound/soundsettings.h +++ b/noncore/settings/sound/soundsettings.h @@ -36,12 +36,13 @@ protected: /* void reject(); */ void updateStorageCombo(); void updateLocationCombo(); private slots: void setKeyButton(const QString &); + void setSizeLimitButton(const QString &); void setLocation(const QString &); void cleanUp(); void setVolume(int); void setMic(int); void volumeChanged( bool muted ); diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp index 6cb4f89..8be1b3d 100644 --- a/noncore/settings/sound/soundsettingsbase.cpp +++ b/noncore/settings/sound/soundsettingsbase.cpp @@ -192,13 +192,14 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m Layout12_2->setMargin( 2 ); GroupBox1 = new QGroupBox( this, "GroupBox1" ); GroupBox1->setTitle( tr( "Vmemo" ) ); QWidget* privateLayoutWidget = new QWidget( GroupBox1, "Layout11" ); - privateLayoutWidget->setGeometry( QRect( 5, 16, 96, 169 ) ); + privateLayoutWidget->setGeometry( QRect( 5, 16, 96, 230 ) ); + Layout11 = new QVBoxLayout( privateLayoutWidget ); Layout11->setSpacing( 2 ); Layout11->setMargin( 0 ); sampleRateLabel = new QLabel( privateLayoutWidget, "sampleRateLabel" ); sampleRateLabel->setText( tr( "Sample Rate" ) ); @@ -233,31 +234,44 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m LocationComboBox = new QComboBox( FALSE, privateLayoutWidget, "LocationComboBox" ); Layout11->addWidget( LocationComboBox ); QLabel *TextLabelKey; TextLabelKey = new QLabel( privateLayoutWidget, "TextLabelKey" ); TextLabelKey->setText( tr( "Record Key:" ) ); + Layout11->addWidget( TextLabelKey ); 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 ); - + QLabel *timeLimitLabel; + timeLimitLabel= new QLabel( privateLayoutWidget, "timeLimitLabel" ); + timeLimitLabel->setText( tr( "Recording Limit:" ) ); + Layout11->addWidget( timeLimitLabel ); + + timeLimitComboBox = new QComboBox( FALSE, privateLayoutWidget, "timeLimitComboBox" ); + timeLimitComboBox->insertItem( tr( "30" ) ); + timeLimitComboBox->insertItem( tr( "20" ) ); + timeLimitComboBox->insertItem( tr( "15" ) ); + timeLimitComboBox->insertItem( tr( "10" ) ); + timeLimitComboBox->insertItem( tr( "5" ) ); + + 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 ); diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h index 20d1c2c..5622b70 100644 --- a/noncore/settings/sound/soundsettingsbase.h +++ b/noncore/settings/sound/soundsettingsbase.h @@ -45,12 +45,13 @@ public: QCheckBox* stereoCheckBox; QCheckBox* sixteenBitCheckBox; QCheckBox* AlertCheckBox; QLabel* TextLabel1; QComboBox* LocationComboBox; QComboBox* keyComboBox; + QComboBox* timeLimitComboBox; bool keyReset; protected: QGridLayout* SoundSettingsBaseLayout; QVBoxLayout* GroupBox3Layout; QVBoxLayout* Layout10; QHBoxLayout* Layout16; |