summaryrefslogtreecommitdiff
path: root/core
authordrw <drw>2005-04-24 21:32:37 (UTC)
committer drw <drw>2005-04-24 21:32:37 (UTC)
commit2391cfd9c79b87b3b00a4bb4a1d76981debb4486 (patch) (side-by-side diff)
tree4ba271b1465881c0cce4ba5fd7a8c95bff5aca24 /core
parentead2586272813b8cab8092773376c690cdf1b906 (diff)
downloadopie-2391cfd9c79b87b3b00a4bb4a1d76981debb4486.zip
opie-2391cfd9c79b87b3b00a4bb4a1d76981debb4486.tar.gz
opie-2391cfd9c79b87b3b00a4bb4a1d76981debb4486.tar.bz2
Resource -> OResource
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/restartapplet2/opie-restartapplet2.control2
-rw-r--r--core/applets/restartapplet2/restart.cpp42
-rw-r--r--core/applets/restartapplet2/restartapplet.pro2
-rw-r--r--core/applets/rotateapplet/rotate.cpp54
-rw-r--r--core/applets/vtapplet/opie-vtapplet.control2
-rw-r--r--core/applets/vtapplet/vt.cpp10
-rw-r--r--core/applets/vtapplet/vtapplet.pro2
7 files changed, 39 insertions, 75 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
@@ -4,7 +4,7 @@ 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
@@ -2,42 +2,12 @@
#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" )
{
@@ -64,12 +34,8 @@ QString RestartApplet::text ( ) const
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
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
@@ -6,7 +6,7 @@ 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
diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp
index d13c2c0..9abbde8 100644
--- a/core/applets/rotateapplet/rotate.cpp
+++ b/core/applets/rotateapplet/rotate.cpp
@@ -1,28 +1,30 @@
/*
- This file is part of the OPIE Project
+                 This file is part of the Opie Project
+
Copyright (C) 2003 Maximilian Reiss <harlekin@handhelds.org>
Copyright (C) 2003 Greg Gilbert <ggilbert@treke.net>
-               =. Copyright (C) 2004 Michael Lauer <mickey@Vanille.de>
-             .=l.
-           .>+-=
- _;:,     .>    :=|. This library is free software; you can
-.> <,   >  .   <= redistribute it and/or modify it under
-:=1 )Y*s>-.--   : the terms of the GNU Library General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%+i>       _;_.
-    .i_,=:_.      -<s. This library is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=| MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>: PARTICULAR PURPOSE. See the GNU
-..}^=.=       =       ; Library General Public License for more
-++=   -.     .     .: details.
- :     =  ...= . :.=-
- -.   .:....=;==+<; You should have received a copy of the GNU
-  -_. . .   )=.  = Library General Public License along with
-    --        :-= this library; see the file COPYING.LIB.
+ Copyright (C) 2004 Michael Lauer <mickey@Vanille.de>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+ :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+ : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
@@ -33,11 +35,12 @@
/* OPIE */
#include <opie2/odebug.h>
#include <opie2/odevice.h>
+#include <opie2/oresource.h>
+
#include <qpe/applnk.h>
#include <qpe/config.h>
#include <qpe/power.h>
#include <qpe/qcopenvelope_qws.h>
-#include <qpe/resource.h>
using namespace Opie::Core;
/* STD */
@@ -139,10 +142,7 @@ QString RotateApplet::tr( const char* s, const char* p ) const
QIconSet RotateApplet::icon() const
{
- QPixmap pix;
- QImage img = Resource::loadImage( "Rotation" );
- if ( !img.isNull() )
- pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
+ QPixmap pix = Opie::Core::OResource::loadPixmap( "Rotation", Opie::Core::OResource::SmallIcon );
return pix;
}
diff --git a/core/applets/vtapplet/opie-vtapplet.control b/core/applets/vtapplet/opie-vtapplet.control
index a1662f1..ae504a9 100644
--- a/core/applets/vtapplet/opie-vtapplet.control
+++ b/core/applets/vtapplet/opie-vtapplet.control
@@ -4,6 +4,6 @@ Priority: optional
Section: opie/applets
Maintainer: Opie Team <opie@handhelds.org>
Architecture: arm
-Depends: task-opie-minimal
+Depends: task-opie-minimal, libopiecore2
Description: Switch to another virtual terminal
Version: $QPE_VERSION$EXTRAVERSION
diff --git a/core/applets/vtapplet/vt.cpp b/core/applets/vtapplet/vt.cpp
index ae89635..0d4e657 100644
--- a/core/applets/vtapplet/vt.cpp
+++ b/core/applets/vtapplet/vt.cpp
@@ -15,8 +15,10 @@
/* OPIE */
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
+
#include <qpe/applnk.h>
-#include <qpe/resource.h>
+
using namespace Opie::Core;
/* QT */
@@ -68,11 +70,7 @@ QString VTApplet::tr( const char* s, const char* p ) const
QIconSet VTApplet::icon ( ) const
{
- QPixmap pix;
- QImage img = Resource::loadImage ( "terminal" );
-
- if ( !img. isNull ( ))
- pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
+ QPixmap pix = Opie::Core::OResource::loadPixmap( "terminal", Opie::Core::OResource::SmallIcon );
return pix;
}
diff --git a/core/applets/vtapplet/vtapplet.pro b/core/applets/vtapplet/vtapplet.pro
index 6c4873c..912af58 100644
--- a/core/applets/vtapplet/vtapplet.pro
+++ b/core/applets/vtapplet/vtapplet.pro
@@ -6,7 +6,7 @@ TARGET = vtapplet
DESTDIR = $(OPIEDIR)/plugins/applets
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe
+LIBS += -lqpe -lopiecore2
VERSION = 1.0.0
include( $(OPIEDIR)/include.pro )