author | llornkcor <llornkcor> | 2002-05-31 12:12:02 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-05-31 12:12:02 (UTC) |
commit | dd08e7fa2ccbcc0489c17ed305b20a9a7d187161 (patch) (side-by-side diff) | |
tree | 59399ddb7c89ad178c85e576018db9471d292b52 | |
parent | 40eac37ff82dd4499a95adb786eb063fd0b81584 (diff) | |
download | opie-dd08e7fa2ccbcc0489c17ed305b20a9a7d187161.zip opie-dd08e7fa2ccbcc0489c17ed305b20a9a7d187161.tar.gz opie-dd08e7fa2ccbcc0489c17ed305b20a9a7d187161.tar.bz2 |
add zeckes change in again *DOH*, and initialize some silly int's to get rid of silly compiler warnings
-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(); |