-rw-r--r-- | noncore/tools/clock/clock.cpp | 21 | ||||
-rw-r--r-- | noncore/tools/clock/clock.h | 2 |
2 files changed, 17 insertions, 6 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp index a85cc19..0a21146 100644 --- a/noncore/tools/clock/clock.cpp +++ b/noncore/tools/clock/clock.cpp | |||
@@ -18,5 +18,4 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | // code added and Copyright (C) by L. J. Potter <ljp@llornkcor.com> 2002 | ||
21 | 20 | ||
22 | #include "clock.h" | 21 | #include "clock.h" |
@@ -33,4 +32,6 @@ | |||
33 | #include <qtimer.h> | 32 | #include <qtimer.h> |
34 | 33 | ||
34 | #include <opie/oclickablelabel.h> | ||
35 | |||
35 | #include <qlcdnumber.h> | 36 | #include <qlcdnumber.h> |
36 | #include <qslider.h> | 37 | #include <qslider.h> |
@@ -94,5 +95,5 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) | |||
94 | 95 | ||
95 | QWidget *controls = new QWidget( this ); | 96 | QWidget *controls = new QWidget( this ); |
96 | QGridLayout *gl = new QGridLayout( controls, 2, 2, 6, 4 ); | 97 | QGridLayout *gl = new QGridLayout( controls, 3, 2, 6, 4 ); |
97 | 98 | ||
98 | QButtonGroup *grp = new QButtonGroup( controls ); | 99 | QButtonGroup *grp = new QButtonGroup( controls ); |
@@ -133,4 +134,9 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) | |||
133 | alarmBtn->setText( tr( "Set Alarm" ) ); | 134 | alarmBtn->setText( tr( "Set Alarm" ) ); |
134 | 135 | ||
136 | OClickableLabel *click = new OClickableLabel(controls, "label" ); | ||
137 | click->setText(tr("Set date and time." ) ); | ||
138 | gl->addMultiCellWidget( click, 3, 3, 0, 2, AlignHCenter); | ||
139 | connect( click, SIGNAL(clicked() ), this, SLOT(slotAdjustTime() ) ); | ||
140 | |||
135 | connect( set, SIGNAL( pressed() ), SLOT( slotSet() ) ); | 141 | connect( set, SIGNAL( pressed() ), SLOT( slotSet() ) ); |
136 | connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) ); | 142 | connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) ); |
@@ -311,5 +317,5 @@ void Clock::slotSnooze() | |||
311 | { | 317 | { |
312 | bSound=FALSE; | 318 | bSound=FALSE; |
313 | int warn; | 319 | int warn = 0; |
314 | QTime t = QTime::currentTime(); | 320 | QTime t = QTime::currentTime(); |
315 | QDateTime whenl( when.date(), t.addSecs( snoozeTime*60)); | 321 | QDateTime whenl( when.date(), t.addSecs( snoozeTime*60)); |
@@ -350,5 +356,5 @@ void Clock::alarmOn() | |||
350 | if( t > tm) | 356 | if( t > tm) |
351 | d = d.addDays(1); | 357 | d = d.addDays(1); |
352 | int warn; | 358 | int warn = 0; |
353 | QDateTime whenl(d,tm); | 359 | QDateTime whenl(d,tm); |
354 | when=whenl; | 360 | when=whenl; |
@@ -361,5 +367,5 @@ void Clock::alarmOn() | |||
361 | void Clock::alarmOff() | 367 | void Clock::alarmOff() |
362 | { | 368 | { |
363 | int warn; | 369 | int warn = 0; |
364 | bSound=FALSE; | 370 | bSound=FALSE; |
365 | AlarmServer::deleteAlarm( when, | 371 | AlarmServer::deleteAlarm( when, |
@@ -480,2 +486,7 @@ QPoint AnalogClock::rotate( QPoint c, QPoint p, int a ) | |||
480 | return QPoint( nx, ny ); | 486 | return QPoint( nx, ny ); |
481 | } | 487 | } |
488 | void Clock::slotAdjustTime() | ||
489 | { | ||
490 | QCopEnvelope e("QPE/System", "execute(QString)"); | ||
491 | e << QString("systemtime"); | ||
492 | } | ||
diff --git a/noncore/tools/clock/clock.h b/noncore/tools/clock/clock.h index e5ed13c..024dd28 100644 --- a/noncore/tools/clock/clock.h +++ b/noncore/tools/clock/clock.h | |||
@@ -77,5 +77,5 @@ private slots: | |||
77 | void appMessage(const QCString& msg, const QByteArray& data); | 77 | void appMessage(const QCString& msg, const QByteArray& data); |
78 | void timerEvent( QTimerEvent *e ); | 78 | void timerEvent( QTimerEvent *e ); |
79 | // void slotAdjustTime(); | 79 | void slotAdjustTime(); |
80 | 80 | ||
81 | private: | 81 | private: |