summaryrefslogtreecommitdiff
path: root/noncore/games/kbill/Picture.cc
Unidiff
Diffstat (limited to 'noncore/games/kbill/Picture.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kbill/Picture.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/games/kbill/Picture.cc b/noncore/games/kbill/Picture.cc
index 9d46257..cf96ddf 100644
--- a/noncore/games/kbill/Picture.cc
+++ b/noncore/games/kbill/Picture.cc
@@ -7,26 +7,26 @@
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17#include "Picture.h" 17#include "Picture.h"
18 18
19#include <iostream> 19#include <opie2/odebug.h>
20 20using namespace Opie::Core;
21#include <qpe/resource.h> 21#include <qpe/resource.h>
22#ifdef KDEVER 22#ifdef KDEVER
23#include <kapp.h> 23#include <kapp.h>
24#include <kstandarddirs.h> 24#include <kstandarddirs.h>
25#include <kdebug.h> 25#include <kdebug.h>
26#endif 26#endif
27void Picture::load(const char *name, int index) { 27void Picture::load(const char *name, int index) {
28 //QString dir = KApplication::kde_datadir(), file; 28 //QString dir = KApplication::kde_datadir(), file;
29 // QString dir = locate("data",""),file; 29 // QString dir = locate("data",""),file;
30 // dir += "/kbill/"; 30 // dir += "/kbill/";
31 // if (index>=0) 31 // if (index>=0)
32 // file.sprintf ("%spixmaps/%s_%d.xpm", (const char *)dir, name, index); 32 // file.sprintf ("%spixmaps/%s_%d.xpm", (const char *)dir, name, index);
@@ -39,25 +39,25 @@ void Picture::load(const char *name, int index) {
39 if (index>=0) { 39 if (index>=0) {
40 //kdDebug() << "Here"; 40 //kdDebug() << "Here";
41 QString sindex; 41 QString sindex;
42 sindex.setNum(index); 42 sindex.setNum(index);
43 // kdDebug() << "kbill/pixmaps/" + QString::fromLocal8Bit(name) + "_" + sindex + ".xpm"; 43 // kdDebug() << "kbill/pixmaps/" + QString::fromLocal8Bit(name) + "_" + sindex + ".xpm";
44 file = dirs.findResource("data","kbill/pixmaps/" + QString::fromLocal8Bit(name) + "_" + sindex + ".xpm"); 44 file = dirs.findResource("data","kbill/pixmaps/" + QString::fromLocal8Bit(name) + "_" + sindex + ".xpm");
45 } else { 45 } else {
46 file = dirs.findResource("data","kbill/pixmaps/" + QString::fromLocal8Bit(name) + ".xpm"); 46 file = dirs.findResource("data","kbill/pixmaps/" + QString::fromLocal8Bit(name) + ".xpm");
47 } 47 }
48 kdDebug() << file << std::endl; 48 kdDebug() << file << std::endl;
49 pix = new QPixmap(); 49 pix = new QPixmap();
50 if (pix->load(file) == FALSE) 50 if (pix->load(file) == FALSE)
51 std::cerr << "cannot open " << file << std::endl; 51 oerr << "cannot open " << file << oendl;
52 width = pix->width(); 52 width = pix->width();
53 height = pix->height(); 53 height = pix->height();
54#endif 54#endif
55QString sindex; 55QString sindex;
56pix = new QPixmap(); 56pix = new QPixmap();
57sindex.setNum(index); 57sindex.setNum(index);
58if (index>=0) 58if (index>=0)
59pix->load(Resource::findPixmap("kbill/pixmaps/" + QString::fromLocal8Bit(name) +"_"+ sindex)); 59pix->load(Resource::findPixmap("kbill/pixmaps/" + QString::fromLocal8Bit(name) +"_"+ sindex));
60else 60else
61pix->load(Resource::findPixmap("kbill/pixmaps/" + QString::fromLocal8Bit(name))); 61pix->load(Resource::findPixmap("kbill/pixmaps/" + QString::fromLocal8Bit(name)));
62 62
63 width = pix->width(); 63 width = pix->width();