summaryrefslogtreecommitdiffabout
path: root/microkde/kiconloader.cpp
Unidiff
Diffstat (limited to 'microkde/kiconloader.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kiconloader.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/microkde/kiconloader.cpp b/microkde/kiconloader.cpp
index 4842d71..e7f657d 100644
--- a/microkde/kiconloader.cpp
+++ b/microkde/kiconloader.cpp
@@ -1,40 +1,42 @@
1 1
2#include "kiconloader.h" 2#include "kiconloader.h"
3#include "kglobal.h" 3#include "kglobal.h"
4 4
5#ifndef DESKTOP_VERSION_OEGEL 5#ifndef DESKTOP_VERSION_OEGEL
6#include <qdir.h> 6#include <qdir.h>
7//Added by qt3to4:
8#include <QPixmap>
7QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int, 9QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int,
8 int, QString *, bool ) const 10 int, QString *, bool ) const
9{ 11{
10 QPixmap pix; 12 QPixmap pix;
11 QString file; 13 QString file;
12 file = iconPath() + name+".png"; 14 file = iconPath() + name+".png";
13 pix.load ( file ); 15 pix.load ( file );
14 // qDebug("KIconLoader::loadIcon %s -----------", file.latin1()); 16 // qDebug("KIconLoader::loadIcon %s -----------", file.latin1());
15 return pix; 17 return pix;
16} 18}
17QIconSet KIconLoader::loadIconSet( const QString& name) const 19QIcon KIconLoader::loadIconSet( const QString& name) const
18{ 20{
19 QPixmap pixmapLoader; 21 QPixmap pixmapLoader;
20 QString file; 22 QString file;
21 file = iconPath() + name+".png"; 23 file = iconPath() + name+".png";
22 pixmapLoader.load( file ); 24 pixmapLoader.load( file );
23 //qDebug("KIconLoader::loadIconSet: %s ************", file.latin1() ); 25 //qDebug("KIconLoader::loadIconSet: %s ************", file.latin1() );
24 QIconSet is ( pixmapLoader ); 26 QIcon is ( pixmapLoader );
25 return is; 27 return is;
26} 28}
27 29
28QPixmap BarIcon( const QString &name ) 30QPixmap BarIcon( const QString &name )
29{ 31{
30 QPixmap pix; 32 QPixmap pix;
31 pix.load ( KGlobal::iconLoader()->iconPath() + name +".png" ); 33 pix.load ( KGlobal::iconLoader()->iconPath() + name +".png" );
32 return pix; 34 return pix;
33} 35}
34 36
35QPixmap DesktopIcon( const QString &name, int ) 37QPixmap DesktopIcon( const QString &name, int )
36{ 38{
37 QPixmap pix; 39 QPixmap pix;
38 pix.load ( KGlobal::iconLoader()->iconPath() + name +".png" ); 40 pix.load ( KGlobal::iconLoader()->iconPath() + name +".png" );
39 return pix; 41 return pix;
40 42
@@ -64,38 +66,38 @@ QPixmap SmallIconSet( const QString &name )
64 66
65#include <qpe/resource.h> 67#include <qpe/resource.h>
66#include <kglobal.h> 68#include <kglobal.h>
67QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int, 69QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int,
68 int, QString *, bool ) const 70 int, QString *, bool ) const
69{ 71{
70 QString px = this->iconPath() + "/" + name; 72 QString px = this->iconPath() + "/" + name;
71 73
72 QPixmap p = Resource::loadPixmap( px ); 74 QPixmap p = Resource::loadPixmap( px );
73 QPixmap* pPtr = &p; 75 QPixmap* pPtr = &p;
74 if (pPtr == 0) 76 if (pPtr == 0)
75 qDebug("KIconLoader::loadIcon: %s not found", px.latin1()); 77 qDebug("KIconLoader::loadIcon: %s not found", px.latin1());
76 78
77 return p; 79 return p;
78} 80}
79 81
80QIconSet KIconLoader::loadIconSet( const QString& name) const 82QIcon KIconLoader::loadIconSet( const QString& name) const
81{ 83{
82 QString px = this->iconPath() + "/" + name; 84 QString px = this->iconPath() + "/" + name;
83 85
84 QIconSet is ;//= Resource::loadIconSet( px ); 86 QIcon is ;//= Resource::loadIconSet( px );
85 QIconSet* isPtr = 0;//LR&is; 87 QIcon* isPtr = 0;//LR&is;
86 if (isPtr == 0) 88 if (isPtr == 0)
87 qDebug("KIconLoader::loadIconSet: %s not foun", px.latin1()); 89 qDebug("KIconLoader::loadIconSet: %s not foun", px.latin1());
88 90
89 return is; 91 return is;
90} 92}
91 93
92QPixmap BarIcon( const QString &name ) 94QPixmap BarIcon( const QString &name )
93{ 95{
94 QPixmap p = KGlobal::iconLoader()->loadIcon(name, KIcon::Desktop); 96 QPixmap p = KGlobal::iconLoader()->loadIcon(name, KIcon::Desktop);
95 return p; 97 return p;
96} 98}
97 99
98QPixmap DesktopIcon( const QString &name, int ) 100QPixmap DesktopIcon( const QString &name, int )
99{ 101{
100 QPixmap p = KGlobal::iconLoader()->loadIcon(name, KIcon::Desktop); 102 QPixmap p = KGlobal::iconLoader()->loadIcon(name, KIcon::Desktop);
101 return p; 103 return p;