-rw-r--r-- | noncore/tools/clock/clock.cpp | 14 |
1 files changed, 13 insertions, 1 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 @@ -32,4 +32,6 @@ #include <qtimer.h> +#include <opie/oclickablelabel.h> + #include <qlcdnumber.h> #include <qslider.h> @@ -93,5 +95,5 @@ 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 ); QButtonGroup *grp = new QButtonGroup( controls ); @@ -132,4 +134,9 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) alarmBtn->setText( tr( "Set Alarm" ) ); + 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() ) ); connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) ); @@ -475,2 +482,7 @@ QPoint AnalogClock::rotate( QPoint c, QPoint p, int a ) return QPoint( nx, ny ); } +void Clock::slotAdjustTime() +{ + QCopEnvelope e("QPE/System", "execute(QString)"); + e << QString("systemtime"); +} |