Diffstat (limited to 'noncore/tools/clock/clock.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/clock/clock.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp index a21a061..ea8e8ca 100644 --- a/noncore/tools/clock/clock.cpp +++ b/noncore/tools/clock/clock.cpp @@ -33,2 +33,4 @@ +#include <opie/oclickablelabel.h> + #include <qlcdnumber.h> @@ -94,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 ); @@ -133,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() ) ); @@ -169,3 +176,3 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) } - + QTimer::singleShot( 0, this, SLOT(updateClock()) ); @@ -186,3 +193,3 @@ void Clock::updateClock() int hour = tm.hour(); - if (hour == 0) + if (hour == 0) hour = 12; @@ -283,3 +290,3 @@ void Clock::modeSelect( int m ) //this sets the alarm time -void Clock::slotSetAlarm() +void Clock::slotSetAlarm() { @@ -305,3 +312,3 @@ void Clock::slotSetAlarm() config.write(); - } + } } @@ -322,3 +329,3 @@ void Clock::slotSnooze() //toggles alarm on/off -void Clock::slotToggleAlarm() +void Clock::slotToggleAlarm() { @@ -476 +483,6 @@ QPoint AnalogClock::rotate( QPoint c, QPoint p, int a ) } +void Clock::slotAdjustTime() +{ + QCopEnvelope e("QPE/System", "execute(QString)"); + e << QString("systemtime"); +} |