author | drw <drw> | 2005-05-04 21:53:48 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-04 21:53:48 (UTC) |
commit | 56fa3f4bcedabb5255fedca463724d57316e2cdb (patch) (unidiff) | |
tree | c8fd8e25e65d158eaf670c6d75041132584c032e /core/applets/clockapplet/clock.cpp | |
parent | a19581c15cdb15f17988b6af958e6aa27eb01c7d (diff) | |
download | opie-56fa3f4bcedabb5255fedca463724d57316e2cdb.zip opie-56fa3f4bcedabb5255fedca463724d57316e2cdb.tar.gz opie-56fa3f4bcedabb5255fedca463724d57316e2cdb.tar.bz2 |
Resource -> OResource
Diffstat (limited to 'core/applets/clockapplet/clock.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/clockapplet/clock.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/applets/clockapplet/clock.cpp b/core/applets/clockapplet/clock.cpp index d7d326d..ba8eb15 100644 --- a/core/applets/clockapplet/clock.cpp +++ b/core/applets/clockapplet/clock.cpp | |||
@@ -16,30 +16,30 @@ | |||
16 | ** | 16 | ** |
17 | ** Contact info@trolltech.com if any conditions of this licensing are | 17 | ** Contact info@trolltech.com if any conditions of this licensing are |
18 | ** not clear to you. | 18 | ** not clear to you. |
19 | ** | 19 | ** |
20 | **********************************************************************/ | 20 | **********************************************************************/ |
21 | // merged in the StyleFix. Applets should raise Popup! | 21 | // merged in the StyleFix. Applets should raise Popup! |
22 | // by zecke@handhelds.org 6th of may 2004 | 22 | // by zecke@handhelds.org 6th of may 2004 |
23 | 23 | ||
24 | #include "clock.h" | 24 | #include "clock.h" |
25 | 25 | ||
26 | /* OPIE */ | 26 | /* OPIE */ |
27 | #include <opie2/odebug.h> | 27 | #include <opie2/odebug.h> |
28 | #include <opie2/oresource.h> | ||
28 | #include <opie2/otaskbarapplet.h> | 29 | #include <opie2/otaskbarapplet.h> |
29 | 30 | ||
30 | #include <qpe/qpeapplication.h> | 31 | #include <qpe/qpeapplication.h> |
31 | #include <qpe/qcopenvelope_qws.h> | 32 | #include <qpe/qcopenvelope_qws.h> |
32 | #include <qpe/config.h> | 33 | #include <qpe/config.h> |
33 | #include <qpe/resource.h> | ||
34 | 34 | ||
35 | #include <qpopupmenu.h> | 35 | #include <qpopupmenu.h> |
36 | 36 | ||
37 | using namespace Opie::Core; | 37 | using namespace Opie::Core; |
38 | using namespace Opie::Ui; | 38 | using namespace Opie::Ui; |
39 | 39 | ||
40 | LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent ) | 40 | LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent ) |
41 | { | 41 | { |
42 | // If you want a sunken border around the clock do this: | 42 | // If you want a sunken border around the clock do this: |
43 | // setFrameStyle( QFrame::Panel | QFrame::Sunken ); | 43 | // setFrameStyle( QFrame::Panel | QFrame::Sunken ); |
44 | //setFont( QFont( "Helvetica", , QFont::Normal ) ); | 44 | //setFont( QFont( "Helvetica", , QFont::Normal ) ); |
45 | connect( qApp, SIGNAL( timeChanged() ), this, SLOT( updateTime() ) ); | 45 | connect( qApp, SIGNAL( timeChanged() ), this, SLOT( updateTime() ) ); |
@@ -66,26 +66,26 @@ void LauncherClock::readConfig() { | |||
66 | 66 | ||
67 | void LauncherClock::mousePressEvent( QMouseEvent * ) | 67 | void LauncherClock::mousePressEvent( QMouseEvent * ) |
68 | { | 68 | { |
69 | QPopupMenu *menu = new QPopupMenu(this); | 69 | QPopupMenu *menu = new QPopupMenu(this); |
70 | menu->insertItem(tr("Set time..."), 0); | 70 | menu->insertItem(tr("Set time..."), 0); |
71 | menu->insertSeparator(); | 71 | menu->insertSeparator(); |
72 | menu->insertItem(tr("Clock.."), 1); | 72 | menu->insertItem(tr("Clock.."), 1); |
73 | 73 | ||
74 | 74 | ||
75 | Config config( "Clock" ); | 75 | Config config( "Clock" ); |
76 | config.setGroup( "Daily Alarm" ); | 76 | config.setGroup( "Daily Alarm" ); |
77 | bool alarmOn = config.readBoolEntry("Enabled", FALSE); | 77 | bool alarmOn = config.readBoolEntry("Enabled", FALSE); |
78 | menu->insertItem(Resource::loadIconSet(alarmOn?"clockapplet/smallalarm":"clockapplet/smallalarm_off" ), | 78 | menu->insertItem( Opie::Core::OResource::loadPixmap( alarmOn ? "clockapplet/smallalarm" : "clockapplet/smallalarm_off", |
79 | tr("Alarm..."), 2); | 79 | Opie::Core::OResource::SmallIcon ), tr("Alarm..."), 2 ); |
80 | 80 | ||
81 | 81 | ||
82 | /* FIXME use OTaskBarApplet ### */ | 82 | /* FIXME use OTaskBarApplet ### */ |
83 | QPoint curPos = mapToGlobal( QPoint(0,0) ); | 83 | QPoint curPos = mapToGlobal( QPoint(0,0) ); |
84 | QSize sh = menu->sizeHint(); | 84 | QSize sh = menu->sizeHint(); |
85 | switch (menu->exec( curPos-QPoint((sh.width()-width())/2,sh.height()) )) { | 85 | switch (menu->exec( curPos-QPoint((sh.width()-width())/2,sh.height()) )) { |
86 | case 0: | 86 | case 0: |
87 | Global::execute( "systemtime" ); | 87 | Global::execute( "systemtime" ); |
88 | break; | 88 | break; |
89 | case 1: { | 89 | case 1: { |
90 | QCopEnvelope e("QPE/Application/clock", "showClock()" ); | 90 | QCopEnvelope e("QPE/Application/clock", "showClock()" ); |
91 | } | 91 | } |