]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/YQIconPool.h
clicking packages work! so the package selector is now
[duncan/yast2-qt4.git] / src / YQIconPool.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:       YQIconPool.h
14
15   Author:     Stefan Hundhammer <sh@suse.de>
16
17 /-*/
18
19
20 #ifndef YQIconPool_h
21 #define YQIconPool_h
22
23 #include <qpixmap.h>
24 #include <QHash>
25
26 class YQIconPool
27 {
28 public:
29
30     static QPixmap pkgAutoDel();
31     static QPixmap pkgAutoInstall();
32     static QPixmap pkgAutoUpdate();
33     static QPixmap pkgDel();
34     static QPixmap pkgInstall();
35     static QPixmap pkgKeepInstalled();
36     static QPixmap pkgNoInst();
37     static QPixmap pkgProtected();
38     static QPixmap pkgSelAutoDel();
39     static QPixmap pkgSelAutoInstall();
40     static QPixmap pkgSelAutoUpdate();
41     static QPixmap pkgTaboo();
42     static QPixmap pkgUpdate();
43
44     static QPixmap disabledPkgAutoDel();
45     static QPixmap disabledPkgAutoInstall();
46     static QPixmap disabledPkgAutoUpdate();
47     static QPixmap disabledPkgDel();
48     static QPixmap disabledPkgInstall();
49     static QPixmap disabledPkgKeepInstalled();
50     static QPixmap disabledPkgNoInst();
51     static QPixmap disabledPkgProtected();
52     static QPixmap disabledPkgSelAutoDel();
53     static QPixmap disabledPkgSelAutoInstall();
54     static QPixmap disabledPkgSelAutoUpdate();
55     static QPixmap disabledPkgTaboo();
56     static QPixmap disabledPkgUpdate();
57
58     static QPixmap checkMarkOn();
59     static QPixmap checkMarkOff();
60     
61     static QPixmap normalPkgConflict();
62     static QPixmap severePkgConflict();
63     static QPixmap unresolvablePkgConflict();
64     static QPixmap deletePkgConflict();
65     static QPixmap tabooPkgConflict();
66     static QPixmap selectPkgConflict();
67
68     static QPixmap treePlus();
69     static QPixmap treeMinus();
70     
71     static QPixmap warningSign();
72     static QPixmap pkgSatisfied();
73
74     static QPixmap stepCurrent();
75     static QPixmap stepToDo();
76     static QPixmap stepDone();
77
78
79 protected:
80
81     /**
82      * Return the global icon pool.
83      **/
84     static YQIconPool * iconPool();
85
86     /**
87      * Return the cached icon for 'xpm_data' ( an included XPM file ).
88      * If the icon isn't in the cache yet, create it and store it in the
89      * cache.
90      **/
91     QPixmap cachedIcon( const char ** xpm_data );
92
93 private:
94
95     /**
96      * (Private!) Constructor
97      * Singleton object - use the static methods only!
98      **/
99     YQIconPool();
100
101     /**
102      * Destructor
103      **/
104     virtual ~YQIconPool();
105
106     
107     //
108     // Data members
109     //
110
111     static YQIconPool * _iconPool;
112     QHash<const char**,QPixmap> _iconCache;
113 };
114
115
116 #endif // ifndef YQIconPool_h