-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 @@ -19,3 +19,2 @@ **********************************************************************/ -// code added and Copyright (C) by L. J. Potter <ljp@llornkcor.com> 2002 @@ -34,2 +33,4 @@ +#include <opie/oclickablelabel.h> + #include <qlcdnumber.h> @@ -95,3 +96,3 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) QWidget *controls = new QWidget( this ); - QGridLayout *gl = new QGridLayout( controls, 2, 2, 6, 4 ); + QGridLayout *gl = new QGridLayout( controls, 3, 2, 6, 4 ); @@ -134,2 +135,7 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) + OClickableLabel *click = new OClickableLabel(controls, "label" ); + click->setText(tr("Set date and time." ) ); + gl->addMultiCellWidget( click, 3, 3, 0, 2, AlignHCenter); + connect( click, SIGNAL(clicked() ), this, SLOT(slotAdjustTime() ) ); + connect( set, SIGNAL( pressed() ), SLOT( slotSet() ) ); @@ -312,3 +318,3 @@ void Clock::slotSnooze() bSound=FALSE; - int warn; + int warn = 0; QTime t = QTime::currentTime(); @@ -351,3 +357,3 @@ void Clock::alarmOn() d = d.addDays(1); - int warn; + int warn = 0; QDateTime whenl(d,tm); @@ -362,3 +368,3 @@ void Clock::alarmOff() { - int warn; + int warn = 0; bSound=FALSE; @@ -481 +487,6 @@ QPoint AnalogClock::rotate( QPoint c, QPoint p, int a ) } +void Clock::slotAdjustTime() +{ + QCopEnvelope e("QPE/System", "execute(QString)"); + e << QString("systemtime"); +} 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 @@ -78,3 +78,3 @@ private slots: void timerEvent( QTimerEvent *e ); -// void slotAdjustTime(); + void slotAdjustTime(); |