summaryrefslogtreecommitdiff
authorzecke <zecke>2002-05-21 14:21:59 (UTC)
committer zecke <zecke>2002-05-21 14:21:59 (UTC)
commitd65dc25caec62d4c554c99fbc151bf4d07c63b72 (patch) (unidiff)
tree37485591f8cd642df0177ea77b860f8d4432e9ef
parent3eb1e88e5915c9dbd521a150cc5dd7eb7dbb3663 (diff)
downloadopie-d65dc25caec62d4c554c99fbc151bf4d07c63b72.zip
opie-d65dc25caec62d4c554c99fbc151bf4d07c63b72.tar.gz
opie-d65dc25caec62d4c554c99fbc151bf4d07c63b72.tar.bz2
usbaility updates a clock should be able to set the time
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/tools/clock/clock.cpp14
-rw-r--r--noncore/tools/clock/clock.h1
-rw-r--r--noncore/tools/clock/clock.pro2
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
@@ -32,4 +32,6 @@
32#include <qtimer.h> 32#include <qtimer.h>
33 33
34#include <opie/oclickablelabel.h>
35
34#include <qlcdnumber.h> 36#include <qlcdnumber.h>
35#include <qslider.h> 37#include <qslider.h>
@@ -93,5 +95,5 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f )
93 95
94 QWidget *controls = new QWidget( this ); 96 QWidget *controls = new QWidget( this );
95 QGridLayout *gl = new QGridLayout( controls, 2, 2, 6, 4 ); 97 QGridLayout *gl = new QGridLayout( controls, 3, 2, 6, 4 );
96 98
97 QButtonGroup *grp = new QButtonGroup( controls ); 99 QButtonGroup *grp = new QButtonGroup( controls );
@@ -132,4 +134,9 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f )
132 alarmBtn->setText( tr( "Set Alarm" ) ); 134 alarmBtn->setText( tr( "Set Alarm" ) );
133 135
136 OClickableLabel *click = new OClickableLabel(controls, "label" );
137 click->setText(tr("Set date and time." ) );
138 gl->addMultiCellWidget( click, 3, 3, 0, 2, AlignHCenter);
139 connect( click, SIGNAL(clicked() ), this, SLOT(slotAdjustTime() ) );
140
134 connect( set, SIGNAL( pressed() ), SLOT( slotSet() ) ); 141 connect( set, SIGNAL( pressed() ), SLOT( slotSet() ) );
135 connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) ); 142 connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) );
@@ -475,2 +482,7 @@ QPoint AnalogClock::rotate( QPoint c, QPoint p, int a )
475 return QPoint( nx, ny ); 482 return QPoint( nx, ny );
476} 483}
484void Clock::slotAdjustTime()
485{
486 QCopEnvelope e("QPE/System", "execute(QString)");
487 e << QString("systemtime");
488}
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
@@ -77,4 +77,5 @@ private slots:
77 void appMessage(const QCString& msg, const QByteArray& data); 77 void appMessage(const QCString& msg, const QByteArray& data);
78 void timerEvent( QTimerEvent *e ); 78 void timerEvent( QTimerEvent *e );
79 void slotAdjustTime();
79 80
80private: 81private:
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
@@ -7,5 +7,5 @@ SOURCES = clock.cpp setAlarm.cpp \
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += $(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe -lopie
10INTERFACES = 10INTERFACES =
11TARGET = clock 11TARGET = clock