summaryrefslogtreecommitdiff
path: root/noncore/tools/clock/setAlarm.cpp
Unidiff
Diffstat (limited to 'noncore/tools/clock/setAlarm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/clock/setAlarm.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/tools/clock/setAlarm.cpp b/noncore/tools/clock/setAlarm.cpp
index 6fec5a0..9d5fc49 100644
--- a/noncore/tools/clock/setAlarm.cpp
+++ b/noncore/tools/clock/setAlarm.cpp
@@ -11,48 +11,49 @@
11 * the Free Software Foundation; either version 2 of the License, or * 11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. * 12 * (at your option) any later version. *
13 ***************************************************************************/ 13 ***************************************************************************/
14 14
15#include "setAlarm.h" 15#include "setAlarm.h"
16 16
17#include <opie2/ofileselector.h> 17#include <opie2/ofileselector.h>
18#include <opie2/ofiledialog.h> 18#include <opie2/ofiledialog.h>
19 19
20#include <qpe/config.h> 20#include <qpe/config.h>
21#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
22#include <qstring.h> 22#include <qstring.h>
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qlcdnumber.h> 24#include <qlcdnumber.h>
25#include <qpushbutton.h> 25#include <qpushbutton.h>
26#include <qradiobutton.h> 26#include <qradiobutton.h>
27#include <qslider.h> 27#include <qslider.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qvariant.h> 29#include <qvariant.h>
30#include <qtooltip.h> 30#include <qtooltip.h>
31#include <qwhatsthis.h> 31#include <qwhatsthis.h>
32#include <qbuttongroup.h> 32#include <qbuttongroup.h>
33#include <qcheckbox.h> 33#include <qcheckbox.h>
34 34
35using namespace Opie::Ui;
35Set_Alarm::Set_Alarm( QWidget* parent, const char* name, bool modal, WFlags fl ) 36Set_Alarm::Set_Alarm( QWidget* parent, const char* name, bool modal, WFlags fl )
36 : QDialog( parent, name, modal, fl ) 37 : QDialog( parent, name, modal, fl )
37{ 38{
38 if ( !name ) 39 if ( !name )
39 setName( "Set_Alarm" ); 40 setName( "Set_Alarm" );
40 resize( 240, 101 ); 41 resize( 240, 101 );
41 setMaximumSize( QSize( 240, 320 ) ); 42 setMaximumSize( QSize( 240, 320 ) );
42 move(0,45); 43 move(0,45);
43 setCaption( tr( "Set Alarm" ) ); 44 setCaption( tr( "Set Alarm" ) );
44 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 45 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
45 46
46 Set_AlarmLayout = new QGridLayout( this ); 47 Set_AlarmLayout = new QGridLayout( this );
47 Set_AlarmLayout->setSpacing( 6 ); 48 Set_AlarmLayout->setSpacing( 6 );
48 Set_AlarmLayout->setMargin( 11 ); 49 Set_AlarmLayout->setMargin( 11 );
49 50
50 TextLabel1 = new QLabel( this, "TextLabel1" ); 51 TextLabel1 = new QLabel( this, "TextLabel1" );
51 TextLabel1->setText( tr( "Hour" ) ); 52 TextLabel1->setText( tr( "Hour" ) );
52 53
53 Set_AlarmLayout->addWidget( TextLabel1, 0, 0 ); 54 Set_AlarmLayout->addWidget( TextLabel1, 0, 0 );
54 55
55 TextLabel2 = new QLabel( this, "TextLabel2" ); 56 TextLabel2 = new QLabel( this, "TextLabel2" );
56 TextLabel2->setText( tr( "Minute" ) ); 57 TextLabel2->setText( tr( "Minute" ) );
57 58
58 Set_AlarmLayout->addMultiCellWidget( TextLabel2, 0, 0, 1, 2 ); 59 Set_AlarmLayout->addMultiCellWidget( TextLabel2, 0, 0, 1, 2 );
@@ -188,36 +189,36 @@ void Set_Alarm::amButtonToggled(bool b)
188{ 189{
189 if ( b) 190 if ( b)
190 Pm_RadioButton->setChecked(FALSE); 191 Pm_RadioButton->setChecked(FALSE);
191} 192}
192 193
193void Set_Alarm::pmButtonToggled(bool b) 194void Set_Alarm::pmButtonToggled(bool b)
194{ 195{
195 if (b) 196 if (b)
196 Am_RadioButton->setChecked(FALSE); 197 Am_RadioButton->setChecked(FALSE);
197} 198}
198 199
199void Set_Alarm::cleanUp() 200void Set_Alarm::cleanUp()
200{ 201{
201} 202}
202 203
203void Set_Alarm::slotChangemp3CkeckBox(bool b) { 204void Set_Alarm::slotChangemp3CkeckBox(bool b) {
204 Config config( "qpe" ); 205 Config config( "qpe" );
205 config.setGroup("Time"); 206 config.setGroup("Time");
206 if(b) { 207 if(b) {
207 QMap<QString, QStringList> map; 208 QMap<QString, QStringList> map;
208 map.insert(tr("All"), QStringList() ); 209 map.insert(tr("All"), QStringList() );
209 QStringList text; 210 QStringList text;
210 text << "audio/*"; 211 text << "audio/*";
211 map.insert(tr("Audio"), text ); 212 map.insert(tr("Audio"), text );
212 QString str = Opie::OFileDialog::getOpenFileName( 2,"/", QString::null, map);//,"", "*", this ); 213 QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map);//,"", "*", this );
213// QString str = Opie::OFileDialog::getOpenFileName( 2,"/");//,"", "*", this ); 214// QString str = Opie::OFileDialog::getOpenFileName( 2,"/");//,"", "*", this );
214 if(!str.isEmpty() ) { 215 if(!str.isEmpty() ) {
215 qDebug(str); 216 qDebug(str);
216 config.writeEntry("mp3Alarm",1); 217 config.writeEntry("mp3Alarm",1);
217 config.writeEntry("mp3File",str); 218 config.writeEntry("mp3File",str);
218 } 219 }
219 } else { 220 } else {
220 config.writeEntry("mp3Alarm",0); 221 config.writeEntry("mp3Alarm",0);
221 config.writeEntry("mp3File",""); 222 config.writeEntry("mp3File","");
222 } 223 }
223} 224}