author | mickeyl <mickeyl> | 2004-03-01 19:19:37 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-03-01 19:19:37 (UTC) |
commit | ddc3d749af5f7afebf69488b79641771fe246b5b (patch) (unidiff) | |
tree | 8ea8614906c568e4677493ef09040724d60dd2d4 /core/applets/clockapplet/clock.cpp | |
parent | fb0981f47e529f9d1dd77fa005ffa3c3ecedff67 (diff) | |
download | opie-ddc3d749af5f7afebf69488b79641771fe246b5b.zip opie-ddc3d749af5f7afebf69488b79641771fe246b5b.tar.gz opie-ddc3d749af5f7afebf69488b79641771fe246b5b.tar.bz2 |
remove duplicated boiler plate code in favour of the OTaskbarApplet template
Diffstat (limited to 'core/applets/clockapplet/clock.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/clockapplet/clock.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/applets/clockapplet/clock.cpp b/core/applets/clockapplet/clock.cpp index aadd9b6..9fead03 100644 --- a/core/applets/clockapplet/clock.cpp +++ b/core/applets/clockapplet/clock.cpp | |||
@@ -17,12 +17,13 @@ | |||
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "clock.h" | 21 | #include "clock.h" |
22 | 22 | ||
23 | #include <opie2/otaskbarapplet.h> | ||
23 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
24 | #include <qpe/qcopenvelope_qws.h> | 25 | #include <qpe/qcopenvelope_qws.h> |
25 | #include <qpe/config.h> | 26 | #include <qpe/config.h> |
26 | 27 | ||
27 | LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent ) | 28 | LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent ) |
28 | { | 29 | { |
@@ -35,12 +36,17 @@ LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent ) | |||
35 | readConfig(); | 36 | readConfig(); |
36 | timerId = 0; | 37 | timerId = 0; |
37 | timerEvent( 0 ); | 38 | timerEvent( 0 ); |
38 | show(); | 39 | show(); |
39 | } | 40 | } |
40 | 41 | ||
42 | int LauncherClock::position() | ||
43 | { | ||
44 | return 10; | ||
45 | } | ||
46 | |||
41 | void LauncherClock::readConfig() { | 47 | void LauncherClock::readConfig() { |
42 | Config config( "qpe" ); | 48 | Config config( "qpe" ); |
43 | config.setGroup( "Time" ); | 49 | config.setGroup( "Time" ); |
44 | ampmFormat = config.readBoolEntry( "AMPM", TRUE ); | 50 | ampmFormat = config.readBoolEntry( "AMPM", TRUE ); |
45 | config.setGroup( "Date" ); | 51 | config.setGroup( "Date" ); |
46 | format = config.readNumEntry("ClockApplet",0); | 52 | format = config.readNumEntry("ClockApplet",0); |
@@ -104,6 +110,12 @@ void LauncherClock::changeTime( void ) | |||
104 | 110 | ||
105 | void LauncherClock::slotClockChanged( bool pm ) | 111 | void LauncherClock::slotClockChanged( bool pm ) |
106 | { | 112 | { |
107 | readConfig(); | 113 | readConfig(); |
108 | updateTime(); | 114 | updateTime(); |
109 | } | 115 | } |
116 | |||
117 | Q_EXPORT_INTERFACE() | ||
118 | { | ||
119 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<LauncherClock> ); | ||
120 | } | ||
121 | |||