summaryrefslogtreecommitdiff
path: root/core/applets/clockapplet/clock.cpp
Side-by-side diff
Diffstat (limited to 'core/applets/clockapplet/clock.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/clockapplet/clock.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/applets/clockapplet/clock.cpp b/core/applets/clockapplet/clock.cpp
index 3b13d74..7d396e7 100644
--- a/core/applets/clockapplet/clock.cpp
+++ b/core/applets/clockapplet/clock.cpp
@@ -11,30 +11,34 @@
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "clock.h"
+/* OPIE */
+#include <opie2/odebug.h>
#include <opie2/otaskbarapplet.h>
#include <qpe/qpeapplication.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/config.h>
+using namespace Opie::Core;
using namespace Opie::Ui;
+
LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent )
{
// If you want a sunken border around the clock do this:
// setFrameStyle( QFrame::Panel | QFrame::Sunken );
//setFont( QFont( "Helvetica", , QFont::Normal ) );
connect( qApp, SIGNAL( timeChanged() ), this, SLOT( updateTime() ) );
connect( qApp, SIGNAL( clockChanged(bool) ),
this, SLOT( slotClockChanged(bool) ) );
readConfig();
timerId = 0;
timerEvent( 0 );
show();
@@ -46,27 +50,27 @@ int LauncherClock::position()
}
void LauncherClock::readConfig() {
Config config( "qpe" );
config.setGroup( "Time" );
ampmFormat = config.readBoolEntry( "AMPM", TRUE );
config.setGroup( "Date" );
format = config.readNumEntry("ClockApplet",0);
}
void LauncherClock::mouseReleaseEvent( QMouseEvent * )
{
- QCString setTimeApp;
- setTimeApp="systemtime";
- QCopEnvelope e("QPE/Application/"+setTimeApp, "raise()");
+ QCString setTimeApp;
+ setTimeApp="systemtime";
+ QCopEnvelope e("QPE/Application/"+setTimeApp, "raise()");
}
void LauncherClock::timerEvent( QTimerEvent *e )
{
if ( !e || e->timerId() == timerId ) {
killTimer( timerId );
changeTime();
QTime t = QTime::currentTime();
int ms = (60 - t.second())*1000 - t.msec();
timerId = startTimer( ms );
} else {