libyui-qt-pkg  2.45.6
YQIconPool.h
1 /**************************************************************************
2 Copyright (C) 2000 - 2010 Novell, Inc.
3 All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 
19 **************************************************************************/
20 
21 
22 
23 /*---------------------------------------------------------------------\
24 | |
25 | __ __ ____ _____ ____ |
26 | \ \ / /_ _/ ___|_ _|___ \ |
27 | \ V / _` \___ \ | | __) | |
28 | | | (_| |___) || | / __/ |
29 | |_|\__,_|____/ |_| |_____| |
30 | |
31 | core system |
32 | (C) SuSE GmbH |
33 \----------------------------------------------------------------------/
34 
35  File: YQIconPool.h
36 
37  Author: Stefan Hundhammer <sh@suse.de>
38 
39 /-*/
40 
41 
42 #ifndef YQIconPool_h
43 #define YQIconPool_h
44 
45 #include <qpixmap.h>
46 #include <QHash>
47 
49 {
50 public:
51 
52  static QPixmap pkgAutoDel();
53  static QPixmap pkgAutoInstall();
54  static QPixmap pkgAutoUpdate();
55  static QPixmap pkgDel();
56  static QPixmap pkgInstall();
57  static QPixmap pkgKeepInstalled();
58  static QPixmap pkgNoInst();
59  static QPixmap pkgProtected();
60  static QPixmap pkgTaboo();
61  static QPixmap pkgUpdate();
62 
63  static QPixmap disabledPkgAutoDel();
64  static QPixmap disabledPkgAutoInstall();
65  static QPixmap disabledPkgAutoUpdate();
66  static QPixmap disabledPkgDel();
67  static QPixmap disabledPkgInstall();
68  static QPixmap disabledPkgKeepInstalled();
69  static QPixmap disabledPkgNoInst();
70  static QPixmap disabledPkgProtected();
71  static QPixmap disabledPkgTaboo();
72  static QPixmap disabledPkgUpdate();
73 
74  static QPixmap checkMarkOn();
75  static QPixmap checkMarkOff();
76 
77  static QPixmap normalPkgConflict();
78  static QPixmap severePkgConflict();
79  static QPixmap unresolvablePkgConflict();
80  static QPixmap deletePkgConflict();
81  static QPixmap tabooPkgConflict();
82  static QPixmap selectPkgConflict();
83 
84  static QPixmap treePlus();
85  static QPixmap treeMinus();
86 
87  static QPixmap warningSign();
88  static QPixmap pkgSatisfied();
89 
90  static QPixmap stepCurrent();
91  static QPixmap stepToDo();
92  static QPixmap stepDone();
93 
94  static QPixmap tabRemove();
95  static QPixmap arrowLeft();
96  static QPixmap arrowRight();
97  static QPixmap arrowUp();
98  static QPixmap arrowDown();
99 
100 protected:
101 
102  /**
103  * Return the global icon pool.
104  **/
105  static YQIconPool * iconPool();
106 
107  /**
108  * Return the cached icon for 'xpm_data' ( an included XPM file ).
109  * If the icon isn't in the cache yet, create it and store it in the
110  * cache.
111  **/
112  QPixmap cachedIcon( const char ** xpm_data );
113 
114 private:
115 
116  /**
117  * (Private!) Constructor
118  * Singleton object - use the static methods only!
119  **/
120  YQIconPool();
121 
122  /**
123  * Destructor
124  **/
125  virtual ~YQIconPool();
126 
127 
128  //
129  // Data members
130  //
131 
132  static YQIconPool * _iconPool;
133  QHash<const char**,QPixmap> _iconCache;
134 };
135 
136 
137 #endif // ifndef YQIconPool_h
static YQIconPool * iconPool()
Return the global icon pool.
Definition: YQIconPool.cc:143
QPixmap cachedIcon(const char **xpm_data)
Return the cached icon for &#39;xpm_data&#39; ( an included XPM file ).
Definition: YQIconPool.cc:165