-rw-r--r-- | core/applets/suspendapplet/suspend.cpp | 8 | ||||
-rw-r--r-- | core/applets/suspendapplet/suspend.h | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/core/applets/suspendapplet/suspend.cpp b/core/applets/suspendapplet/suspend.cpp index 0eb94cb..4fbd704 100644 --- a/core/applets/suspendapplet/suspend.cpp +++ b/core/applets/suspendapplet/suspend.cpp | |||
@@ -1,20 +1,20 @@ | |||
1 | #include "suspend.h" | ||
2 | |||
3 | #include <qpe/applnk.h> | ||
1 | #include <qpe/resource.h> | 4 | #include <qpe/resource.h> |
2 | #include <qpe/qcopenvelope_qws.h> | 5 | #include <qpe/qcopenvelope_qws.h> |
3 | 6 | ||
4 | #include <qapplication.h> | 7 | #include <qapplication.h> |
5 | 8 | ||
6 | #include "suspend.h" | ||
7 | |||
8 | |||
9 | SuspendApplet::SuspendApplet ( ) | 9 | SuspendApplet::SuspendApplet ( ) |
10 | : QObject ( 0, "SuspendApplet" ) | 10 | : QObject ( 0, "SuspendApplet" ) |
11 | { | 11 | { |
12 | } | 12 | } |
13 | 13 | ||
14 | SuspendApplet::~SuspendApplet ( ) | 14 | SuspendApplet::~SuspendApplet ( ) |
15 | { | 15 | { |
16 | } | 16 | } |
17 | 17 | ||
18 | int SuspendApplet::position ( ) const | 18 | int SuspendApplet::position ( ) const |
19 | { | 19 | { |
20 | return 2; | 20 | return 2; |
@@ -37,25 +37,25 @@ QString SuspendApplet::tr( const char* s ) const | |||
37 | 37 | ||
38 | QString SuspendApplet::tr( const char* s, const char* p ) const | 38 | QString SuspendApplet::tr( const char* s, const char* p ) const |
39 | { | 39 | { |
40 | return qApp->translate( "SuspendApplet", s, p ); | 40 | return qApp->translate( "SuspendApplet", s, p ); |
41 | } | 41 | } |
42 | 42 | ||
43 | QIconSet SuspendApplet::icon ( ) const | 43 | QIconSet SuspendApplet::icon ( ) const |
44 | { | 44 | { |
45 | QPixmap pix; | 45 | QPixmap pix; |
46 | QImage img = Resource::loadImage ( "suspend" ); | 46 | QImage img = Resource::loadImage ( "suspend" ); |
47 | 47 | ||
48 | if ( !img. isNull ( )) | 48 | if ( !img. isNull ( )) |
49 | pix. convertFromImage ( img. smoothScale ( 14, 14 )); | 49 | pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
50 | return pix; | 50 | return pix; |
51 | } | 51 | } |
52 | 52 | ||
53 | QPopupMenu *SuspendApplet::popup ( QWidget * ) const | 53 | QPopupMenu *SuspendApplet::popup ( QWidget * ) const |
54 | { | 54 | { |
55 | return 0; | 55 | return 0; |
56 | } | 56 | } |
57 | 57 | ||
58 | void SuspendApplet::activated ( ) | 58 | void SuspendApplet::activated ( ) |
59 | { | 59 | { |
60 | // suspend | 60 | // suspend |
61 | QCopEnvelope ( "QPE/System", "suspend()" ); | 61 | QCopEnvelope ( "QPE/System", "suspend()" ); |
diff --git a/core/applets/suspendapplet/suspend.h b/core/applets/suspendapplet/suspend.h index 8c54cde..c037adc 100644 --- a/core/applets/suspendapplet/suspend.h +++ b/core/applets/suspendapplet/suspend.h | |||
@@ -12,24 +12,25 @@ | |||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef __OPIE_SUSPEND_APPLET_H__ | 20 | #ifndef __OPIE_SUSPEND_APPLET_H__ |
21 | #define __OPIE_SUSPEND_APPLET_H__ | 21 | #define __OPIE_SUSPEND_APPLET_H__ |
22 | 22 | ||
23 | #include <qpe/menuappletinterface.h> | 23 | #include <qpe/menuappletinterface.h> |
24 | #include <qobject.h> | ||
24 | 25 | ||
25 | class SuspendApplet : public QObject, public MenuAppletInterface | 26 | class SuspendApplet : public QObject, public MenuAppletInterface |
26 | { | 27 | { |
27 | public: | 28 | public: |
28 | SuspendApplet ( ); | 29 | SuspendApplet ( ); |
29 | virtual ~SuspendApplet ( ); | 30 | virtual ~SuspendApplet ( ); |
30 | 31 | ||
31 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); | 32 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); |
32 | Q_REFCOUNT | 33 | Q_REFCOUNT |
33 | 34 | ||
34 | virtual int position() const; | 35 | virtual int position() const; |
35 | 36 | ||