summaryrefslogtreecommitdiff
path: root/noncore/tools/clock/clock.cpp
Unidiff
Diffstat (limited to 'noncore/tools/clock/clock.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/clock/clock.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp
index b780675..485354b 100644
--- a/noncore/tools/clock/clock.cpp
+++ b/noncore/tools/clock/clock.cpp
@@ -47,24 +47,25 @@
47#include <qdatetime.h> 47#include <qdatetime.h>
48 48
49#include <math.h> 49#include <math.h>
50#include <unistd.h> 50#include <unistd.h>
51#include <sys/types.h> 51#include <sys/types.h>
52 52
53#include <pthread.h> 53#include <pthread.h>
54 54
55 55
56const double deg2rad = 0.017453292519943295769; // pi/180 56const double deg2rad = 0.017453292519943295769; // pi/180
57const int sw_prec = 2; 57const int sw_prec = 2;
58 58
59using namespace Opie::Ui;
59void startPlayer() 60void startPlayer()
60{ 61{
61 Config config( "qpe" ); 62 Config config( "qpe" );
62 config.setGroup( "Time" ); 63 config.setGroup( "Time" );
63 sleep(15); 64 sleep(15);
64 QCopEnvelope e( "QPE/Application/opieplayer", "setDocument(QString)" ); 65 QCopEnvelope e( "QPE/Application/opieplayer", "setDocument(QString)" );
65 e << config.readEntry( "mp3File", "" ); 66 e << config.readEntry( "mp3File", "" );
66} 67}
67 68
68 69
69static void toggleScreenSaver( bool on ) 70static void toggleScreenSaver( bool on )
70{ 71{
@@ -136,25 +137,25 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f )
136 reset->setText( tr( "Reset" ) ); 137 reset->setText( tr( "Reset" ) );
137 reset->setEnabled( FALSE ); 138 reset->setEnabled( FALSE );
138 grp->insert( reset ); 139 grp->insert( reset );
139 140
140 alarmOffBtn = new QPushButton ( controls ); 141 alarmOffBtn = new QPushButton ( controls );
141 gl->addWidget( alarmOffBtn, 0, 2 ); 142 gl->addWidget( alarmOffBtn, 0, 2 );
142 143
143 alarmBtn = new QPushButton ( controls ); 144 alarmBtn = new QPushButton ( controls );
144 gl->addWidget( alarmBtn, 1, 2 ); 145 gl->addWidget( alarmBtn, 1, 2 );
145 146
146 alarmBtn->setText( tr( "Set Alarm" ) ); 147 alarmBtn->setText( tr( "Set Alarm" ) );
147 148
148 Opie::OClickableLabel *click = new Opie::OClickableLabel( controls, "label" ); 149 OClickableLabel *click = new Opie::Ui::OClickableLabel( controls, "label" );
149 click->setText( tr( "Set date and time." ) ); 150 click->setText( tr( "Set date and time." ) );
150 gl->addMultiCellWidget( click, 3, 3, 0, 2, AlignHCenter ); 151 gl->addMultiCellWidget( click, 3, 3, 0, 2, AlignHCenter );
151 connect( click, SIGNAL( clicked() ), this, SLOT( slotAdjustTime() ) ); 152 connect( click, SIGNAL( clicked() ), this, SLOT( slotAdjustTime() ) );
152 153
153 connect( set , SIGNAL( pressed() ), SLOT( slotSet() ) ); 154 connect( set , SIGNAL( pressed() ), SLOT( slotSet() ) );
154 connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) ); 155 connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) );
155 156
156 connect( alarmBtn, SIGNAL( clicked() ), SLOT( slotSetAlarm() ) ); 157 connect( alarmBtn, SIGNAL( clicked() ), SLOT( slotSetAlarm() ) );
157 connect( snoozeBtn, SIGNAL( clicked() ), SLOT( slotSnooze() ) ); 158 connect( snoozeBtn, SIGNAL( clicked() ), SLOT( slotSnooze() ) );
158 connect( alarmOffBtn, SIGNAL( clicked() ), SLOT( slotToggleAlarm() ) ); 159 connect( alarmOffBtn, SIGNAL( clicked() ), SLOT( slotToggleAlarm() ) );
159 160
160 connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), 161 connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ),