summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-05-31 13:00:05 (UTC)
committer llornkcor <llornkcor>2002-05-31 13:00:05 (UTC)
commit075f2ae74f328581ec0db05d633961f3baa5ed36 (patch) (unidiff)
tree370eb2838813a9fa2aaf47e32f6e711dd2a8f36e
parentdd08e7fa2ccbcc0489c17ed305b20a9a7d187161 (diff)
downloadopie-075f2ae74f328581ec0db05d633961f3baa5ed36.zip
opie-075f2ae74f328581ec0db05d633961f3baa5ed36.tar.gz
opie-075f2ae74f328581ec0db05d633961f3baa5ed36.tar.bz2
added clock to popup if closed before app gets alarm message
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/clock/clock.cpp11
-rw-r--r--noncore/tools/clock/clock.h1
2 files changed, 9 insertions, 3 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp
index 0a21146..9b9e644 100644
--- a/noncore/tools/clock/clock.cpp
+++ b/noncore/tools/clock/clock.cpp
@@ -17,6 +17,7 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20// changes added and Copyright (C) by L. J. Potter <ljp@llornkcor.com> 2002
20 21
21#include "clock.h" 22#include "clock.h"
22#include "setAlarm.h" 23#include "setAlarm.h"
@@ -66,6 +67,7 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f )
66 config.setGroup("Time"); 67 config.setGroup("Time");
67 ampm = config.readBoolEntry( "AMPM", TRUE ); 68 ampm = config.readBoolEntry( "AMPM", TRUE );
68 69
70
69 snoozeBtn = new QPushButton ( this); 71 snoozeBtn = new QPushButton ( this);
70 snoozeBtn->setText( tr( "Snooze" ) ); 72 snoozeBtn->setText( tr( "Snooze" ) );
71 73
@@ -380,10 +382,15 @@ void Clock::appMessage(const QCString& msg, const QByteArray& data)
380 int stopTimer = 0; 382 int stopTimer = 0;
381 int timerStay = 5000; 383 int timerStay = 5000;
382 bSound=TRUE; 384 bSound=TRUE;
385 qDebug("Message received in clock");
383 if ( msg == "alarm(QDateTime,int)" ) { 386 if ( msg == "alarm(QDateTime,int)" ) {
384 Sound::soundAlarm(); 387 Sound::soundAlarm();
385 stopTimer = startTimer( timerStay); 388 stopTimer = startTimer( timerStay);
386 } 389 }
390 show();
391 raise();
392 QPEApplication::setKeepRunning();
393 setActiveWindow();
387} 394}
388 395
389void Clock::timerEvent( QTimerEvent *e ) 396void Clock::timerEvent( QTimerEvent *e )
@@ -485,8 +492,8 @@ QPoint AnalogClock::rotate( QPoint c, QPoint p, int a )
485 ( p.x() - c.x() ) * sin( angle ); 492 ( p.x() - c.x() ) * sin( angle );
486 return QPoint( nx, ny ); 493 return QPoint( nx, ny );
487} 494}
488void Clock::slotAdjustTime() 495
489{ 496void Clock::slotAdjustTime() {
490 QCopEnvelope e("QPE/System", "execute(QString)"); 497 QCopEnvelope e("QPE/System", "execute(QString)");
491 e << QString("systemtime"); 498 e << QString("systemtime");
492} 499}
diff --git a/noncore/tools/clock/clock.h b/noncore/tools/clock/clock.h
index 024dd28..be71b9d 100644
--- a/noncore/tools/clock/clock.h
+++ b/noncore/tools/clock/clock.h
@@ -77,7 +77,6 @@ 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 void slotAdjustTime();
80
81private: 80private:
82 void clearClock(); 81 void clearClock();
83 82