From 075f2ae74f328581ec0db05d633961f3baa5ed36 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Fri, 31 May 2002 13:00:05 +0000 Subject: added clock to popup if closed before app gets alarm message --- (limited to 'noncore/tools/clock') 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 @@ ** not clear to you. ** **********************************************************************/ +// changes added and Copyright (C) by L. J. Potter 2002 #include "clock.h" #include "setAlarm.h" @@ -66,6 +67,7 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) config.setGroup("Time"); ampm = config.readBoolEntry( "AMPM", TRUE ); + snoozeBtn = new QPushButton ( this); snoozeBtn->setText( tr( "Snooze" ) ); @@ -380,10 +382,15 @@ void Clock::appMessage(const QCString& msg, const QByteArray& data) int stopTimer = 0; int timerStay = 5000; bSound=TRUE; + qDebug("Message received in clock"); if ( msg == "alarm(QDateTime,int)" ) { Sound::soundAlarm(); stopTimer = startTimer( timerStay); } + show(); + raise(); + QPEApplication::setKeepRunning(); + setActiveWindow(); } void Clock::timerEvent( QTimerEvent *e ) @@ -485,8 +492,8 @@ QPoint AnalogClock::rotate( QPoint c, QPoint p, int a ) ( p.x() - c.x() ) * sin( angle ); return QPoint( nx, ny ); } -void Clock::slotAdjustTime() -{ + +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 024dd28..be71b9d 100644 --- a/noncore/tools/clock/clock.h +++ b/noncore/tools/clock/clock.h @@ -77,7 +77,6 @@ private slots: void appMessage(const QCString& msg, const QByteArray& data); void timerEvent( QTimerEvent *e ); void slotAdjustTime(); - private: void clearClock(); -- cgit v0.9.0.2