summaryrefslogtreecommitdiff
Unidiff
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
@@ -1,20 +1,20 @@
1TEMPLATE = app 1TEMPLATE = app
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3DESTDIR = $(OPIEDIR)/bin 3DESTDIR = $(OPIEDIR)/bin
4HEADERS = soundsettings.h soundsettingsbase.h 4HEADERS = 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
12TRANSLATIONS = ../../i18n/pt_BR/sound.ts 12TRANSLATIONS = ../../i18n/pt_BR/sound.ts
13TRANSLATIONS += ../../i18n/es/sound.ts 13TRANSLATIONS += ../../i18n/es/sound.ts
14TRANSLATIONS += ../../i18n/pt/sound.ts 14TRANSLATIONS += ../../i18n/pt/sound.ts
15TRANSLATIONS += ../../i18n/de/sound.ts 15TRANSLATIONS += ../../i18n/de/sound.ts
16TRANSLATIONS += ../../i18n/en/sound.ts 16TRANSLATIONS += ../../i18n/en/sound.ts
17TRANSLATIONS += ../../i18n/hu/sound.ts 17TRANSLATIONS += ../../i18n/hu/sound.ts
18TRANSLATIONS += ../../i18n/sl/sound.ts 18TRANSLATIONS += ../../i18n/sl/sound.ts
19TRANSLATIONS += ../../i18n/pl/sound.ts 19TRANSLATIONS += ../../i18n/pl/sound.ts
20TRANSLATIONS += ../../i18n/ja/sound.ts 20TRANSLATIONS += ../../i18n/ja/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
@@ -67,39 +67,52 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
67 sampleRate->setCurrentItem(4); 67 sampleRate->setCurrentItem(4);
68 68
69 stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only 69 stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only
70 struct utsname name; /* check for embedix kernel running on the zaurus*/ 70 struct utsname name; /* check for embedix kernel running on the zaurus*/
71 if (uname(&name) != -1) { 71 if (uname(&name) != -1) {
72 QString release=name.release; 72 QString release=name.release;
73 73
74 if( release.find("embedix",0,TRUE) !=-1) 74 if( release.find("embedix",0,TRUE) !=-1)
75 stereoCheckBox->hide(); 75 stereoCheckBox->hide();
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));
82 94
83 cfg.setGroup("Defaults"); 95 cfg.setGroup("Defaults");
84 keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); 96 keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") );
85 97
86 updateStorageCombo(); 98 updateStorageCombo();
87 99
88 connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); 100 connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int)));
89 connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int))); 101 connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int)));
90 connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) ); 102 connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) );
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
97// void SoundSettings::reject() 110// void SoundSettings::reject()
98// { 111// {
99// qDebug("reject"); 112// qDebug("reject");
100// Config config( "qpe"); 113// Config config( "qpe");
101// config.setGroup( "Volume"); 114// config.setGroup( "Volume");
102 115
103// setVolume(100-config.readNumEntry("VolumePercent")); 116// setVolume(100-config.readNumEntry("VolumePercent"));
104// setMic(100-config.readNumEntry("Mic")); 117// setMic(100-config.readNumEntry("Mic"));
105 118
@@ -239,12 +252,20 @@ void SoundSettings::cleanUp() {
239 252
240void SoundSettings::setKeyButton(const QString &name) { 253void SoundSettings::setKeyButton(const QString &name) {
241 Config cfg("Vmemo"); 254 Config cfg("Vmemo");
242 cfg.setGroup("Defaults"); 255 cfg.setGroup("Defaults");
243 cfg.writeEntry( "toggleKey", keyComboBox->currentItem() ); 256 cfg.writeEntry( "toggleKey", keyComboBox->currentItem() );
244 keyReset = TRUE; 257 keyReset = TRUE;
245 cfg.write(); 258 cfg.write();
246} 259}
247 260
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
@@ -30,24 +30,25 @@ Q_OBJECT
30 30
31public: 31public:
32 SoundSettings( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 32 SoundSettings( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
33 33
34protected: 34protected:
35/* void accept(); */ 35/* void accept(); */
36/* void reject(); */ 36/* void reject(); */
37 void updateStorageCombo(); 37 void updateStorageCombo();
38 void updateLocationCombo(); 38 void updateLocationCombo();
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);
45 void setMic(int); 46 void setMic(int);
46 47
47 void volumeChanged( bool muted ); 48 void volumeChanged( bool muted );
48 void micChanged( bool muted ); 49 void micChanged( bool muted );
49}; 50};
50 51
51 52
52#endif // SOUNDSETTINGS_H 53#endif // SOUNDSETTINGS_H
53 54
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
@@ -186,25 +186,26 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
186 GroupBox3Layout->addLayout( Layout10 ); 186 GroupBox3Layout->addLayout( Layout10 );
187 187
188 SoundSettingsBaseLayout->addWidget( GroupBox3, 0, 0 ); 188 SoundSettingsBaseLayout->addWidget( GroupBox3, 0, 0 );
189 189
190 Layout12_2 = new QVBoxLayout; 190 Layout12_2 = new QVBoxLayout;
191 Layout12_2->setSpacing( 2 ); 191 Layout12_2->setSpacing( 2 );
192 Layout12_2->setMargin( 2 ); 192 Layout12_2->setMargin( 2 );
193 193
194 GroupBox1 = new QGroupBox( this, "GroupBox1" ); 194 GroupBox1 = new QGroupBox( this, "GroupBox1" );
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 );
202 203
203 sampleRateLabel = new QLabel( privateLayoutWidget, "sampleRateLabel" ); 204 sampleRateLabel = new QLabel( privateLayoutWidget, "sampleRateLabel" );
204 sampleRateLabel->setText( tr( "Sample Rate" ) ); 205 sampleRateLabel->setText( tr( "Sample Rate" ) );
205 Layout11->addWidget( sampleRateLabel ); 206 Layout11->addWidget( sampleRateLabel );
206 207
207 sampleRate = new QComboBox( FALSE, privateLayoutWidget, "sampleRate" ); 208 sampleRate = new QComboBox( FALSE, privateLayoutWidget, "sampleRate" );
208 sampleRate->insertItem( tr( "8000" ) ); 209 sampleRate->insertItem( tr( "8000" ) );
209 sampleRate->insertItem( tr( "11025" ) ); 210 sampleRate->insertItem( tr( "11025" ) );
210 sampleRate->insertItem( tr( "22050" ) ); 211 sampleRate->insertItem( tr( "22050" ) );
@@ -227,43 +228,56 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
227 228
228 TextLabel1 = new QLabel( privateLayoutWidget, "TextLabel1" ); 229 TextLabel1 = new QLabel( privateLayoutWidget, "TextLabel1" );
229 TextLabel1->setText( tr( "Location:" ) ); 230 TextLabel1->setText( tr( "Location:" ) );
230 Layout11->addWidget( TextLabel1 ); 231 Layout11->addWidget( TextLabel1 );
231 232
232 233
233 LocationComboBox = new QComboBox( FALSE, privateLayoutWidget, "LocationComboBox" ); 234 LocationComboBox = new QComboBox( FALSE, privateLayoutWidget, "LocationComboBox" );
234 Layout11->addWidget( LocationComboBox ); 235 Layout11->addWidget( LocationComboBox );
235 236
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( "" ) );
242 keyComboBox->insertItem( tr( "Taskbar Icon" ) ); 244 keyComboBox->insertItem( tr( "Taskbar Icon" ) );
243 keyComboBox->insertItem( tr( "Key_Escape" ) ); 245 keyComboBox->insertItem( tr( "Key_Escape" ) );
244 keyComboBox->insertItem( tr( "Key_Space" ) ); 246 keyComboBox->insertItem( tr( "Key_Space" ) );
245 keyComboBox->insertItem( tr( "Key_Home" ) ); 247 keyComboBox->insertItem( tr( "Key_Home" ) );
246 keyComboBox->insertItem( tr( "Key_Calender" ) ); 248 keyComboBox->insertItem( tr( "Key_Calender" ) );
247 keyComboBox->insertItem( tr( "Key_Contacts" ) ); 249 keyComboBox->insertItem( tr( "Key_Contacts" ) );
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" );
261// // touchsound->setText( tr( "Screen sounds" ) ); 275// // touchsound->setText( tr( "Screen sounds" ) );
262// // Layout12_2->addWidget( touchsound ); 276// // Layout12_2->addWidget( touchsound );
263 277
264// // keysound = new QCheckBox( this, "keysound" ); 278// // keysound = new QCheckBox( this, "keysound" );
265// // keysound->setText( tr( "Keyboard sounds" ) ); 279// // keysound->setText( tr( "Keyboard sounds" ) );
266// // Layout12_2->addWidget( keysound ); 280// // Layout12_2->addWidget( keysound );
267 281
268 SoundSettingsBaseLayout->addLayout( Layout12_2, 0, 1 ); 282 SoundSettingsBaseLayout->addLayout( Layout12_2, 0, 1 );
269} 283}
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
@@ -39,24 +39,25 @@ public:
39 QSlider* mic; 39 QSlider* mic;
40 QLabel* PixmapLabel2_2; 40 QLabel* PixmapLabel2_2;
41 QLabel* TextLabel2_2; 41 QLabel* TextLabel2_2;
42 QGroupBox* GroupBox1; 42 QGroupBox* GroupBox1;
43 QLabel* sampleRateLabel; 43 QLabel* sampleRateLabel;
44 QComboBox* sampleRate; 44 QComboBox* sampleRate;
45 QCheckBox* stereoCheckBox; 45 QCheckBox* stereoCheckBox;
46 QCheckBox* sixteenBitCheckBox; 46 QCheckBox* sixteenBitCheckBox;
47 QCheckBox* AlertCheckBox; 47 QCheckBox* AlertCheckBox;
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;
54 QVBoxLayout* GroupBox3Layout; 55 QVBoxLayout* GroupBox3Layout;
55 QVBoxLayout* Layout10; 56 QVBoxLayout* Layout10;
56 QHBoxLayout* Layout16; 57 QHBoxLayout* Layout16;
57 QHBoxLayout* Layout13; 58 QHBoxLayout* Layout13;
58 QHBoxLayout* Layout12; 59 QHBoxLayout* Layout12;
59 QHBoxLayout* Layout17; 60 QHBoxLayout* Layout17;
60 QVBoxLayout* Layout12_2; 61 QVBoxLayout* Layout12_2;
61 QVBoxLayout* Layout11; 62 QVBoxLayout* Layout11;
62protected slots: 63protected slots: