author | drw <drw> | 2005-04-24 21:32:37 (UTC) |
---|---|---|
committer | drw <drw> | 2005-04-24 21:32:37 (UTC) |
commit | 2391cfd9c79b87b3b00a4bb4a1d76981debb4486 (patch) (side-by-side diff) | |
tree | 4ba271b1465881c0cce4ba5fd7a8c95bff5aca24 /core/applets/restartapplet2 | |
parent | ead2586272813b8cab8092773376c690cdf1b906 (diff) | |
download | opie-2391cfd9c79b87b3b00a4bb4a1d76981debb4486.zip opie-2391cfd9c79b87b3b00a4bb4a1d76981debb4486.tar.gz opie-2391cfd9c79b87b3b00a4bb4a1d76981debb4486.tar.bz2 |
Resource -> OResource
-rw-r--r-- | core/applets/restartapplet2/opie-restartapplet2.control | 2 | ||||
-rw-r--r-- | core/applets/restartapplet2/restart.cpp | 42 | ||||
-rw-r--r-- | core/applets/restartapplet2/restartapplet.pro | 2 |
3 files changed, 6 insertions, 40 deletions
diff --git a/core/applets/restartapplet2/opie-restartapplet2.control b/core/applets/restartapplet2/opie-restartapplet2.control index cec3b19..9cc8dac 100644 --- a/core/applets/restartapplet2/opie-restartapplet2.control +++ b/core/applets/restartapplet2/opie-restartapplet2.control @@ -1,10 +1,10 @@ Package: opie-restartapplet2 Files: plugins/applets/librestartapplet2.so* Priority: optional Section: opie/applets Maintainer: L.J. Potter <lpotter@trolltech.com> Architecture: arm -Depends: task-opie-minimal +Depends: task-opie-minimal, libopiecore2 Description: Restart Applet A simple opie menu applet to restart the Opie environment Version: $QPE_VERSION$EXTRAVERSION diff --git a/core/applets/restartapplet2/restart.cpp b/core/applets/restartapplet2/restart.cpp index eda0005..42d814a 100644 --- a/core/applets/restartapplet2/restart.cpp +++ b/core/applets/restartapplet2/restart.cpp @@ -1,52 +1,22 @@ // coptright Mon 10-21-2002 01:14:03 by L. Potter <ljp@llornkcor.com> #include "restart.h" +#include <opie2/oresource.h> + #include <qpe/applnk.h> #include <qpe/qpeapplication.h> -#include <qpe/resource.h> #include <qpe/qcopenvelope_qws.h> -/* XPM */ -static char *restart_xpm[] = { -"16 16 11 1", -" c None", -". c #000000", -"+ c #DCDCDC", -"@ c #A0A0A0", -"# c #C3C3C3", -"$ c #808080", -"% c #FFA858", -"& c #FFDCA8", -"* c #FFFFC0", -"= c #FFFFFF", -"- c #585858", -" .. ", -" .. .++. .. ", -" .+@.@##@.@+. ", -" .@+$@%%@$+@. ", -" .$%%&%&%$. ", -" ..+@%&$$%&@+.. ", -".+#@%&%@@&*%@#+.", -".$@+$&*&&=*$+@$.", -" .--+$&*=&$+--. ", -" .$#++$$++#$. ", -" .@=$-$++$-$=@. ", -" .+@-..@@..-@+. ", -" ... .+=. ... ", -" .-$. ", -" .. ", -" "}; - RestartApplet::RestartApplet ( ) : QObject ( 0, "RestartApplet" ) { } RestartApplet::~RestartApplet ( ) { } int RestartApplet::position ( ) const { return 4; @@ -55,30 +25,26 @@ int RestartApplet::position ( ) const QString RestartApplet::name ( ) const { return tr( "Restart" ); } QString RestartApplet::text ( ) const { return tr( "Restart Opie" ); } QIconSet RestartApplet::icon ( ) const { - QPixmap pix; - QImage img = ( const char** ) restart_xpm ;//Resource::loadImage ( "Run" ); - - if ( !img. isNull ( )) - pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); - return pix; + QPixmap pix = Opie::Core::OResource::loadPixmap( "exec", Opie::Core::OResource::SmallIcon ); + return pix; } QPopupMenu *RestartApplet::popup ( QWidget * ) const { return 0; } void RestartApplet::activated ( ) { QCopEnvelope e("QPE/System", "restart()"); } diff --git a/core/applets/restartapplet2/restartapplet.pro b/core/applets/restartapplet2/restartapplet.pro index 60d34f2..d3c408d 100644 --- a/core/applets/restartapplet2/restartapplet.pro +++ b/core/applets/restartapplet2/restartapplet.pro @@ -1,17 +1,17 @@ TEMPLATE = lib CONFIG += qt plugin warn_on HEADERS = restart.h SOURCES = restart.cpp TARGET = restartapplet2 DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 VERSION = 1.0.0 MOC_DIR=opieobj OBJECTS_DIR=opieobj include( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets |