author | zecke <zecke> | 2002-05-21 14:21:59 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-05-21 14:21:59 (UTC) |
commit | d65dc25caec62d4c554c99fbc151bf4d07c63b72 (patch) (unidiff) | |
tree | 37485591f8cd642df0177ea77b860f8d4432e9ef | |
parent | 3eb1e88e5915c9dbd521a150cc5dd7eb7dbb3663 (diff) | |
download | opie-d65dc25caec62d4c554c99fbc151bf4d07c63b72.zip opie-d65dc25caec62d4c554c99fbc151bf4d07c63b72.tar.gz opie-d65dc25caec62d4c554c99fbc151bf4d07c63b72.tar.bz2 |
usbaility updates a clock should be able to set the time
-rw-r--r-- | noncore/tools/clock/clock.cpp | 24 | ||||
-rw-r--r-- | noncore/tools/clock/clock.h | 1 | ||||
-rw-r--r-- | noncore/tools/clock/clock.pro | 2 |
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 @@ | |||
33 | 33 | ||
34 | #include <opie/oclickablelabel.h> | ||
35 | |||
34 | #include <qlcdnumber.h> | 36 | #include <qlcdnumber.h> |
@@ -94,3 +96,3 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) | |||
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 | ||
@@ -133,2 +135,7 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) | |||
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() ) ); |
@@ -169,3 +176,3 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) | |||
169 | } | 176 | } |
170 | 177 | ||
171 | QTimer::singleShot( 0, this, SLOT(updateClock()) ); | 178 | QTimer::singleShot( 0, this, SLOT(updateClock()) ); |
@@ -186,3 +193,3 @@ void Clock::updateClock() | |||
186 | int hour = tm.hour(); | 193 | int hour = tm.hour(); |
187 | if (hour == 0) | 194 | if (hour == 0) |
188 | hour = 12; | 195 | hour = 12; |
@@ -283,3 +290,3 @@ void Clock::modeSelect( int m ) | |||
283 | //this sets the alarm time | 290 | //this sets the alarm time |
284 | void Clock::slotSetAlarm() | 291 | void Clock::slotSetAlarm() |
285 | { | 292 | { |
@@ -305,3 +312,3 @@ void Clock::slotSetAlarm() | |||
305 | config.write(); | 312 | config.write(); |
306 | } | 313 | } |
307 | } | 314 | } |
@@ -322,3 +329,3 @@ void Clock::slotSnooze() | |||
322 | //toggles alarm on/off | 329 | //toggles alarm on/off |
323 | void Clock::slotToggleAlarm() | 330 | void Clock::slotToggleAlarm() |
324 | { | 331 | { |
@@ -476 +483,6 @@ QPoint AnalogClock::rotate( QPoint c, QPoint p, int a ) | |||
476 | } | 483 | } |
484 | void 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 | |||
@@ -78,2 +78,3 @@ private slots: | |||
78 | void timerEvent( QTimerEvent *e ); | 78 | void timerEvent( QTimerEvent *e ); |
79 | void slotAdjustTime(); | ||
79 | 80 | ||
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 | |||
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe -lopie |
10 | INTERFACES = | 10 | INTERFACES = |