Diffstat (limited to 'core/applets/clockapplet/clock.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/clockapplet/clock.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/applets/clockapplet/clock.cpp b/core/applets/clockapplet/clock.cpp index c186fb3..ba079bf 100644 --- a/core/applets/clockapplet/clock.cpp +++ b/core/applets/clockapplet/clock.cpp | |||
@@ -19,21 +19,23 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "clock.h" | 21 | #include "clock.h" |
22 | 22 | ||
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
25 | #include <qpe/qcopenvelope_qws.h> | ||
25 | #include <qpe/config.h> | 26 | #include <qpe/config.h> |
26 | 27 | ||
27 | #include <qmainwindow.h> | 28 | #include <qmainwindow.h> |
28 | #include <qlayout.h> | 29 | #include <qlayout.h> |
29 | #include <qpushbutton.h> | 30 | #include <qpushbutton.h> |
30 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
31 | #include <qdatetime.h> | 32 | #include <qdatetime.h> |
32 | #include <qtimer.h> | 33 | #include <qtimer.h> |
33 | #include <qpopupmenu.h> | 34 | #include <qpopupmenu.h> |
35 | #include <qfile.h> | ||
34 | #include <stdlib.h> | 36 | #include <stdlib.h> |
35 | 37 | ||
36 | 38 | ||
37 | LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent ) | 39 | LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent ) |
38 | { | 40 | { |
39 | // If you want a sunken border around the clock do this: | 41 | // If you want a sunken border around the clock do this: |
@@ -55,13 +57,22 @@ void LauncherClock::readConfig() { | |||
55 | config.setGroup( "Date" ); | 57 | config.setGroup( "Date" ); |
56 | format = config.readNumEntry("ClockApplet",0); | 58 | format = config.readNumEntry("ClockApplet",0); |
57 | } | 59 | } |
58 | 60 | ||
59 | void LauncherClock::mouseReleaseEvent( QMouseEvent * ) | 61 | void LauncherClock::mouseReleaseEvent( QMouseEvent * ) |
60 | { | 62 | { |
61 | Global::execute( "systemtime" ); | 63 | QCString setTimeApp; |
64 | if (QFile::exists(QPEApplication::qpeDir()+"bin/netsystemtime")) | ||
65 | setTimeApp="netsystemtime"; | ||
66 | else setTimeApp="systemtime"; | ||
67 | qDebug("app "+setTimeApp); | ||
68 | QCopEnvelope e("QPE/Application/"+setTimeApp, "setDocument(QString)"); | ||
69 | QString lf = QString::null; | ||
70 | |||
71 | e << lf; | ||
72 | |||
62 | } | 73 | } |
63 | 74 | ||
64 | 75 | ||
65 | void LauncherClock::timerEvent( QTimerEvent *e ) | 76 | void LauncherClock::timerEvent( QTimerEvent *e ) |
66 | { | 77 | { |
67 | if ( !e || e->timerId() == timerId ) { | 78 | if ( !e || e->timerId() == timerId ) { |