summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/clockapplet/clock.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/applets/clockapplet/clock.cpp b/core/applets/clockapplet/clock.cpp
index 5fb8f44..aadd9b6 100644
--- a/core/applets/clockapplet/clock.cpp
+++ b/core/applets/clockapplet/clock.cpp
@@ -29,52 +29,49 @@ LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent )
29 // If you want a sunken border around the clock do this: 29 // If you want a sunken border around the clock do this:
30 // setFrameStyle( QFrame::Panel | QFrame::Sunken ); 30 // setFrameStyle( QFrame::Panel | QFrame::Sunken );
31 //setFont( QFont( "Helvetica", , QFont::Normal ) ); 31 //setFont( QFont( "Helvetica", , QFont::Normal ) );
32 connect( qApp, SIGNAL( timeChanged() ), this, SLOT( updateTime( ) ) ); 32 connect( qApp, SIGNAL( timeChanged() ), this, SLOT( updateTime( ) ) );
33 connect( qApp, SIGNAL( clockChanged( bool ) ), 33 connect( qApp, SIGNAL( clockChanged( bool ) ),
34 this, SLOT( slotClockChanged( bool ) ) ); 34 this, SLOT( slotClockChanged( bool ) ) );
35 readConfig(); 35 readConfig();
36 timerId = 0; 36 timerId = 0;
37 timerEvent( 0 ); 37 timerEvent( 0 );
38 show(); 38 show();
39} 39}
40 40
41void LauncherClock::readConfig() { 41void LauncherClock::readConfig() {
42 Config config( "qpe" ); 42 Config config( "qpe" );
43 config.setGroup( "Time" ); 43 config.setGroup( "Time" );
44 ampmFormat = config.readBoolEntry( "AMPM", TRUE ); 44 ampmFormat = config.readBoolEntry( "AMPM", TRUE );
45 config.setGroup( "Date" ); 45 config.setGroup( "Date" );
46 format = config.readNumEntry("ClockApplet",0); 46 format = config.readNumEntry("ClockApplet",0);
47} 47}
48 48
49void LauncherClock::mouseReleaseEvent( QMouseEvent * ) 49void LauncherClock::mouseReleaseEvent( QMouseEvent * )
50{ 50{
51 QCString setTimeApp; 51 QCString setTimeApp;
52 setTimeApp="systemtime"; 52 setTimeApp="systemtime";
53 QCopEnvelope e("QPE/Application/"+setTimeApp, "setDocument(QString)"); 53 QCopEnvelope e("QPE/Application/"+setTimeApp, "raise()");
54 QString lf = QString::null;
55
56 e << lf;
57} 54}
58 55
59 56
60void LauncherClock::timerEvent( QTimerEvent *e ) 57void LauncherClock::timerEvent( QTimerEvent *e )
61{ 58{
62 if ( !e || e->timerId() == timerId ) { 59 if ( !e || e->timerId() == timerId ) {
63 killTimer( timerId ); 60 killTimer( timerId );
64 changeTime(); 61 changeTime();
65 QTime t = QTime::currentTime(); 62 QTime t = QTime::currentTime();
66 int ms = (60 - t.second())*1000 - t.msec(); 63 int ms = (60 - t.second())*1000 - t.msec();
67 timerId = startTimer( ms ); 64 timerId = startTimer( ms );
68 } else { 65 } else {
69 QLabel::timerEvent( e ); 66 QLabel::timerEvent( e );
70 } 67 }
71} 68}
72 69
73void LauncherClock::updateTime( void ) 70void LauncherClock::updateTime( void )
74{ 71{
75 changeTime(); 72 changeTime();
76} 73}
77 74
78void LauncherClock::changeTime( void ) 75void LauncherClock::changeTime( void )
79{ 76{
80 QTime tm = QDateTime::currentDateTime().time(); 77 QTime tm = QDateTime::currentDateTime().time();