summaryrefslogtreecommitdiff
path: root/noncore/tools
Side-by-side diff
Diffstat (limited to 'noncore/tools') (more/less context) (show whitespace changes)
-rw-r--r--noncore/tools/clock/clock.cpp21
-rw-r--r--noncore/tools/clock/clock.h2
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
@@ -18,5 +18,4 @@
**
**********************************************************************/
-// code added and Copyright (C) by L. J. Potter <ljp@llornkcor.com> 2002
#include "clock.h"
@@ -33,4 +32,6 @@
#include <qtimer.h>
+#include <opie/oclickablelabel.h>
+
#include <qlcdnumber.h>
#include <qslider.h>
@@ -94,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 );
@@ -133,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() ) );
@@ -311,5 +317,5 @@ void Clock::slotSnooze()
{
bSound=FALSE;
- int warn;
+ int warn = 0;
QTime t = QTime::currentTime();
QDateTime whenl( when.date(), t.addSecs( snoozeTime*60));
@@ -350,5 +356,5 @@ void Clock::alarmOn()
if( t > tm)
d = d.addDays(1);
- int warn;
+ int warn = 0;
QDateTime whenl(d,tm);
when=whenl;
@@ -361,5 +367,5 @@ void Clock::alarmOn()
void Clock::alarmOff()
{
- int warn;
+ int warn = 0;
bSound=FALSE;
AlarmServer::deleteAlarm( when,
@@ -480,2 +486,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");
+}
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
@@ -77,5 +77,5 @@ private slots:
void appMessage(const QCString& msg, const QByteArray& data);
void timerEvent( QTimerEvent *e );
-// void slotAdjustTime();
+ void slotAdjustTime();
private: