summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/clock/clock.cpp24
-rw-r--r--noncore/tools/clock/clock.h1
-rw-r--r--noncore/tools/clock/clock.pro2
3 files changed, 20 insertions, 7 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");
+}
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 =