summaryrefslogtreecommitdiffabout
path: root/microkde/kiconloader.h
blob: 2abb667c567579ce28ab0121ec0d448388819155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef MINIKDE_KICONLOADER_H
#define MINIKDE_KICONLOADER_H

#include <qpixmap.h>
#include <qstring.h>
//US
#include <qicon.h>

class KIcon
{
  public:
    enum Group { NoGroup=-1, Desktop=0, Toolbar, MainToolbar, Small,
	         Panel, LastGroup, User };
    enum StdSizes { SizeSmall=16, SizeMedium=32, SizeLarge=48 };
    enum States { DefaultState, ActiveState, DisabledState, LastState };
};

class KIconLoader
{
  public:
    KIconLoader()
      : mIconpath(0) {}
      
    KIconLoader( const QString &iconpath )
      : mIconpath(iconpath) {}

//US    QPixmap loadIcon( const QString &name, int ); 

    QPixmap loadIcon(const QString& name, KIcon::Group group, int size=0,
		     int state=KIcon::DefaultState, QString *path_store=0,
		     bool canReturnNull=false) const;

//US    
    QString setIconPath( const QString &);
    QString iconPath( /*US const QString &, int */) const;
    QString iconPath( const QString &, int ) const;
    QIcon loadIconSet( const QString &name) const; 
    
//US to make this class usable for different applications, we have to add a iconpathvariable
  private:
    QString mIconpath;
};

QPixmap BarIcon(const QString& name);

QPixmap DesktopIcon(const QString& name, int);

QPixmap SmallIcon(const QString& name);

QPixmap SmallIconSet( const QString &name );

#endif