summaryrefslogtreecommitdiff
path: root/noncore/games/kbill/Picture.cc
Unidiff
Diffstat (limited to 'noncore/games/kbill/Picture.cc') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/kbill/Picture.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/noncore/games/kbill/Picture.cc b/noncore/games/kbill/Picture.cc
index cf96ddf..9659667 100644
--- a/noncore/games/kbill/Picture.cc
+++ b/noncore/games/kbill/Picture.cc
@@ -17,21 +17,13 @@
17#include "Picture.h" 17#include "Picture.h"
18 18
19#include <opie2/odebug.h> 19#include <opie2/odebug.h>
20using namespace Opie::Core; 20#include <opie2/oresource.h>
21#include <qpe/resource.h>
22#ifdef KDEVER 21#ifdef KDEVER
23#include <kapp.h> 22#include <kapp.h>
24#include <kstandarddirs.h> 23#include <kstandarddirs.h>
25#include <kdebug.h> 24#include <kdebug.h>
26#endif 25#endif
27void Picture::load(const char *name, int index) { 26void Picture::load(const char *name, int index) {
28 //QString dir = KApplication::kde_datadir(), file;
29 // QString dir = locate("data",""),file;
30 // dir += "/kbill/";
31 // if (index>=0)
32 // file.sprintf ("%spixmaps/%s_%d.xpm", (const char *)dir, name, index);
33 // else
34 // file.sprintf("%spixmaps/%s.xpm", (const char *)dir, name);
35#ifdef KDEVER 27#ifdef KDEVER
36 KStandardDirs dirs; 28 KStandardDirs dirs;
37 QString file; 29 QString file;
@@ -53,12 +45,12 @@ void Picture::load(const char *name, int index) {
53 height = pix->height(); 45 height = pix->height();
54#endif 46#endif
55QString sindex; 47QString sindex;
56pix = new QPixmap(); 48//pix = new QPixmap();
57sindex.setNum(index); 49sindex.setNum(index);
58if (index>=0) 50if (index>=0)
59pix->load(Resource::findPixmap("kbill/pixmaps/" + QString::fromLocal8Bit(name) +"_"+ sindex)); 51 pix = new QPixmap( Opie::Core::OResource::loadPixmap( "kbill/pixmaps/" + QString::fromLocal8Bit(name) +"_"+ sindex ) );
60else 52else
61pix->load(Resource::findPixmap("kbill/pixmaps/" + QString::fromLocal8Bit(name))); 53 pix = new QPixmap( Opie::Core::OResource::loadPixmap( "kbill/pixmaps/" + QString::fromLocal8Bit(name) ) );
62 54
63 width = pix->width(); 55 width = pix->width();
64 height = pix->height(); 56 height = pix->height();