-rw-r--r-- | core/applets/homeapplet/home.cpp | 9 | ||||
-rw-r--r-- | core/applets/homeapplet/homeapplet.pro | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/core/applets/homeapplet/home.cpp b/core/applets/homeapplet/home.cpp index 02d1265..5a917ff 100644 --- a/core/applets/homeapplet/home.cpp +++ b/core/applets/homeapplet/home.cpp @@ -1,85 +1,82 @@ #include "home.h" +#include <opie2/oresource.h> + #include <qpe/applnk.h> -#include <qpe/resource.h> #include <qpe/qcopenvelope_qws.h> #include <qapplication.h> HomeApplet::HomeApplet ( ) : QObject ( 0, "HomeApplet" ) { } HomeApplet::~HomeApplet ( ) { } int HomeApplet::position ( ) const { return 4; } QString HomeApplet::name ( ) const { return tr( "Home shortcut" ); } QString HomeApplet::text ( ) const { return tr( "Desktop" ); } QString HomeApplet::tr( const char* s ) const { return qApp->translate( "HomeApplet", s, 0 ); } QString HomeApplet::tr( const char* s, const char* p ) const { return qApp->translate( "HomeApplet", s, p ); } QIconSet HomeApplet::icon ( ) const { - QPixmap pix; - QImage img = Resource::loadImage ( "home" ); - - if ( !img. isNull ( )) - pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + QPixmap pix = Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon ); return pix; } QPopupMenu *HomeApplet::popup ( QWidget * ) const { return 0; } void HomeApplet::activated ( ) { // to desktop (home) QCopEnvelope ( "QPE/Application/qpe", "raise()" ); } QRESULT HomeApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_MenuApplet ) *iface = this; else return QS_FALSE; if ( *iface ) (*iface)-> addRef ( ); return QS_OK; } Q_EXPORT_INTERFACE( ) { Q_CREATE_INSTANCE( HomeApplet ) } diff --git a/core/applets/homeapplet/homeapplet.pro b/core/applets/homeapplet/homeapplet.pro index a8db61f..e21e80f 100644 --- a/core/applets/homeapplet/homeapplet.pro +++ b/core/applets/homeapplet/homeapplet.pro @@ -1,13 +1,13 @@ TEMPLATE = lib CONFIG += qt plugin warn_on HEADERS = home.h SOURCES = home.cpp TARGET = homeapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 VERSION = 1.0.0 include( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets |