-rw-r--r-- | noncore/tools/clock/clock.cpp | 14 | ||||
-rw-r--r-- | noncore/tools/clock/clock.h | 1 | ||||
-rw-r--r-- | noncore/tools/clock/clock.pro | 2 |
3 files changed, 15 insertions, 2 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() ) ); @@ -476 +483,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 9b756b5..024dd28 100644 --- a/noncore/tools/clock/clock.h +++ b/noncore/tools/clock/clock.h @@ -78,2 +78,3 @@ private slots: void timerEvent( QTimerEvent *e ); + void slotAdjustTime(); diff --git a/noncore/tools/clock/clock.pro b/noncore/tools/clock/clock.pro index 5373515..7eecce1 100644 --- a/noncore/tools/clock/clock.pro +++ b/noncore/tools/clock/clock.pro @@ -8,3 +8,3 @@ INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopie INTERFACES = |