summaryrefslogtreecommitdiff
path: root/core/applets/logoutapplet
authormickeyl <mickeyl>2005-04-01 23:30:07 (UTC)
committer mickeyl <mickeyl>2005-04-01 23:30:07 (UTC)
commit8a1c307f9dfc26a31d42f29f29a5b1c048b99102 (patch) (unidiff)
tree8e8925baf6a77e01379264afb540f33a3c07bec7 /core/applets/logoutapplet
parent88cc0cc17864de6e36bdeedaae6df0a5cc738c5a (diff)
downloadopie-8a1c307f9dfc26a31d42f29f29a5b1c048b99102.zip
opie-8a1c307f9dfc26a31d42f29f29a5b1c048b99102.tar.gz
opie-8a1c307f9dfc26a31d42f29f29a5b1c048b99102.tar.bz2
scale O-Menu-Applet pixmaps according to AppLnk::smallIconSize
Diffstat (limited to 'core/applets/logoutapplet') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/logoutapplet/logout.cpp8
-rw-r--r--core/applets/logoutapplet/logout.h1
2 files changed, 5 insertions, 4 deletions
diff --git a/core/applets/logoutapplet/logout.cpp b/core/applets/logoutapplet/logout.cpp
index 0ac0067..0f36f16 100644
--- a/core/applets/logoutapplet/logout.cpp
+++ b/core/applets/logoutapplet/logout.cpp
@@ -1,23 +1,23 @@
1#include "logout.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#include <qmessagebox.h> 8#include <qmessagebox.h>
6 9
7#include <unistd.h> 10#include <unistd.h>
8 11
9#include "logout.h"
10
11
12LogoutApplet::LogoutApplet ( ) 12LogoutApplet::LogoutApplet ( )
13 : QObject ( 0, "LogoutApplet" ) 13 : QObject ( 0, "LogoutApplet" )
14{ 14{
15} 15}
16 16
17LogoutApplet::~LogoutApplet ( ) 17LogoutApplet::~LogoutApplet ( )
18{ 18{
19} 19}
20 20
21int LogoutApplet::position ( ) const 21int LogoutApplet::position ( ) const
22{ 22{
23 return 0; 23 return 0;
@@ -40,25 +40,25 @@ QString LogoutApplet::tr( const char* s ) const
40 40
41QString LogoutApplet::tr( const char* s, const char* p ) const 41QString LogoutApplet::tr( const char* s, const char* p ) const
42{ 42{
43 return qApp->translate( "LogoutApplet", s, p ); 43 return qApp->translate( "LogoutApplet", s, p );
44} 44}
45 45
46QIconSet LogoutApplet::icon ( ) const 46QIconSet LogoutApplet::icon ( ) const
47{ 47{
48 QPixmap pix; 48 QPixmap pix;
49 QImage img = Resource::loadImage ( "logout" ); 49 QImage img = Resource::loadImage ( "logout" );
50 50
51 if ( !img. isNull ( )) 51 if ( !img. isNull ( ))
52 pix. convertFromImage ( img. smoothScale ( 14, 14 )); 52 pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
53 return pix; 53 return pix;
54} 54}
55 55
56QPopupMenu *LogoutApplet::popup ( QWidget * ) const 56QPopupMenu *LogoutApplet::popup ( QWidget * ) const
57{ 57{
58 return 0; 58 return 0;
59} 59}
60 60
61// This is a workaround for a Qt bug 61// This is a workaround for a Qt bug
62// clipboard applet has to stop its poll timer, or Qt/E 62// clipboard applet has to stop its poll timer, or Qt/E
63// will hang on quit() right before it emits aboutToQuit() 63// will hang on quit() right before it emits aboutToQuit()
64 64
diff --git a/core/applets/logoutapplet/logout.h b/core/applets/logoutapplet/logout.h
index a991f65..3c17278 100644
--- a/core/applets/logoutapplet/logout.h
+++ b/core/applets/logoutapplet/logout.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_LOGOUT_APPLET_H__ 20#ifndef __OPIE_LOGOUT_APPLET_H__
21#define __OPIE_LOGOUT_APPLET_H__ 21#define __OPIE_LOGOUT_APPLET_H__
22 22
23#include <qpe/menuappletinterface.h> 23#include <qpe/menuappletinterface.h>
24#include <qobject.h>
24 25
25class LogoutApplet : public QObject, public MenuAppletInterface 26class LogoutApplet : public QObject, public MenuAppletInterface
26{ 27{
27public: 28public:
28 LogoutApplet ( ); 29 LogoutApplet ( );
29 virtual ~LogoutApplet ( ); 30 virtual ~LogoutApplet ( );
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