summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-06-23 18:33:17 (UTC)
committer llornkcor <llornkcor>2002-06-23 18:33:17 (UTC)
commitb50f663aabaf51821a35a94354237a3387954e79 (patch) (unidiff)
treec2dc2879fc7d6964aea4201995927e967f3bade3
parentf0e656b51a2dcee1dec594636cbc1ba8d4b11eef (diff)
downloadopie-b50f663aabaf51821a35a94354237a3387954e79.zip
opie-b50f663aabaf51821a35a94354237a3387954e79.tar.gz
opie-b50f663aabaf51821a35a94354237a3387954e79.tar.bz2
added recording time limit
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/sound/sound.pro2
-rw-r--r--noncore/settings/sound/soundsettings.cpp21
-rw-r--r--noncore/settings/sound/soundsettings.h1
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp26
-rw-r--r--noncore/settings/sound/soundsettingsbase.h1
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
@@ -5,7 +5,7 @@ HEADERS = soundsettings.h soundsettingsbase.h
5SOURCES = soundsettings.cpp soundsettingsbase.cpp main.cpp 5SOURCES = soundsettings.cpp soundsettingsbase.cpp main.cpp
6#INTERFACES = soundsettingsbase.ui 6#INTERFACES = soundsettingsbase.ui
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += ../$(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe
10TARGET = sound 10TARGET = sound
11 11
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
@@ -76,6 +76,18 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
76 } 76 }
77// else 77// else
78// stereoCheckBox->hide(); 78// stereoCheckBox->hide();
79 int sRate=config.readNumEntry("SizeLimit", 30);
80 if(sRate ==30)
81 timeLimitComboBox->setCurrentItem(0);
82 else if(sRate==20)
83 timeLimitComboBox->setCurrentItem(1);
84 else if(sRate == 15)
85 timeLimitComboBox->setCurrentItem(2);
86 else if(sRate == 10)
87
88 timeLimitComboBox->setCurrentItem(3);
89 else
90 timeLimitComboBox->setCurrentItem(4);
79 91
80 92
81 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); 93 sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1));
@@ -91,6 +103,7 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
91 connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) ); 103 connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) );
92 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); 104 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &)));
93 connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT(setKeyButton(const QString &))); 105 connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT(setKeyButton(const QString &)));
106 connect( timeLimitComboBox,SIGNAL(activated( const QString &)),this,SLOT(setSizeLimitButton(const QString &)));
94// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 107// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
95} 108}
96 109
@@ -248,3 +261,11 @@ void SoundSettings::setKeyButton(const QString &name) {
248void SoundSettings::updateLocationCombo() { 261void SoundSettings::updateLocationCombo() {
249 262
250} 263}
264
265void SoundSettings::setSizeLimitButton(const QString &index) {
266
267 Config cfg("Vmemo");
268 cfg.setGroup("Record");
269 cfg.writeEntry("SizeLimit", index);
270 cfg.write();
271}
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
@@ -39,6 +39,7 @@ protected:
39 39
40private slots: 40private slots:
41 void setKeyButton(const QString &); 41 void setKeyButton(const QString &);
42 void setSizeLimitButton(const QString &);
42 void setLocation(const QString &); 43 void setLocation(const QString &);
43 void cleanUp(); 44 void cleanUp();
44 void setVolume(int); 45 void setVolume(int);
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
@@ -195,7 +195,8 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
195 GroupBox1->setTitle( tr( "Vmemo" ) ); 195 GroupBox1->setTitle( tr( "Vmemo" ) );
196 196
197 QWidget* privateLayoutWidget = new QWidget( GroupBox1, "Layout11" ); 197 QWidget* privateLayoutWidget = new QWidget( GroupBox1, "Layout11" );
198 privateLayoutWidget->setGeometry( QRect( 5, 16, 96, 169 ) ); 198 privateLayoutWidget->setGeometry( QRect( 5, 16, 96, 230 ) );
199
199 Layout11 = new QVBoxLayout( privateLayoutWidget ); 200 Layout11 = new QVBoxLayout( privateLayoutWidget );
200 Layout11->setSpacing( 2 ); 201 Layout11->setSpacing( 2 );
201 Layout11->setMargin( 0 ); 202 Layout11->setMargin( 0 );
@@ -236,6 +237,7 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
236 QLabel *TextLabelKey; 237 QLabel *TextLabelKey;
237 TextLabelKey = new QLabel( privateLayoutWidget, "TextLabelKey" ); 238 TextLabelKey = new QLabel( privateLayoutWidget, "TextLabelKey" );
238 TextLabelKey->setText( tr( "Record Key:" ) ); 239 TextLabelKey->setText( tr( "Record Key:" ) );
240 Layout11->addWidget( TextLabelKey );
239 241
240 keyComboBox = new QComboBox( FALSE, privateLayoutWidget, "keyComboBox" ); 242 keyComboBox = new QComboBox( FALSE, privateLayoutWidget, "keyComboBox" );
241 keyComboBox->insertItem( tr( "" ) ); 243 keyComboBox->insertItem( tr( "" ) );
@@ -248,13 +250,25 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
248 keyComboBox->insertItem( tr( "Key_Menu" ) ); 250 keyComboBox->insertItem( tr( "Key_Menu" ) );
249 keyComboBox->insertItem( tr( "Key_Mail" ) ); 251 keyComboBox->insertItem( tr( "Key_Mail" ) );
250 252
251 Layout11->addWidget( TextLabelKey );
252
253 Layout11->addWidget( keyComboBox ); 253 Layout11->addWidget( keyComboBox );
254 254
255 QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); 255 QLabel *timeLimitLabel;
256 Layout11->addItem( spacer_9 ); 256 timeLimitLabel= new QLabel( privateLayoutWidget, "timeLimitLabel" );
257 257 timeLimitLabel->setText( tr( "Recording Limit:" ) );
258 Layout11->addWidget( timeLimitLabel );
259
260 timeLimitComboBox = new QComboBox( FALSE, privateLayoutWidget, "timeLimitComboBox" );
261 timeLimitComboBox->insertItem( tr( "30" ) );
262 timeLimitComboBox->insertItem( tr( "20" ) );
263 timeLimitComboBox->insertItem( tr( "15" ) );
264 timeLimitComboBox->insertItem( tr( "10" ) );
265 timeLimitComboBox->insertItem( tr( "5" ) );
266
267 Layout11->addWidget(timeLimitComboBox);
268 QLabel *timeLimitLabel2;
269 timeLimitLabel2= new QLabel( privateLayoutWidget, "timeLimitLabel2" );
270 timeLimitLabel2->setText( tr( "seconds" ) );
271 Layout11->addWidget( timeLimitLabel2 );
258 272
259 Layout12_2->addWidget( GroupBox1 ); 273 Layout12_2->addWidget( GroupBox1 );
260// // touchsound = new QCheckBox( this, "touchsound" ); 274// // touchsound = new QCheckBox( this, "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
@@ -48,6 +48,7 @@ public:
48 QLabel* TextLabel1; 48 QLabel* TextLabel1;
49 QComboBox* LocationComboBox; 49 QComboBox* LocationComboBox;
50 QComboBox* keyComboBox; 50 QComboBox* keyComboBox;
51 QComboBox* timeLimitComboBox;
51 bool keyReset; 52 bool keyReset;
52protected: 53protected:
53 QGridLayout* SoundSettingsBaseLayout; 54 QGridLayout* SoundSettingsBaseLayout;