BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
VIEW
KERNEL
iconLoader.h
Go to the documentation of this file.
1
#ifndef BALL_VIEW_KERNEL_ICONLOADER_H
2
#define BALL_VIEW_KERNEL_ICONLOADER_H
3
4
#include <list>
5
#include <boost/shared_ptr.hpp>
6
#include <
BALL/DATATYPE/hashMap.h
>
7
8
#include <QtCore/QMutex>
9
#include <QtCore/QReadWriteLock>
10
#include <QtCore/QStringList>
11
12
class
QIcon;
13
14
namespace
BALL
15
{
16
class
String;
17
18
namespace
VIEW
19
{
28
class
BALL_VIEW_EXPORT
IconLoader
29
{
30
public
:
35
IconLoader
();
36
42
explicit
IconLoader
(
const
QStringList& icon_dirs);
43
49
explicit
IconLoader
(
const
std::list<String>& icon_dirs);
50
55
~
IconLoader
();
56
60
static
IconLoader
& instance();
61
70
void
appendIconPath(
const
String
& path);
71
77
const
QIcon& getIcon(
const
String
& name);
78
79
private
:
80
//Threads and singleton
81
static
QMutex
mutex_
;
82
static
boost::shared_ptr<IconLoader>
loader_
;
83
QReadWriteLock
hash_map_lock_
;
84
85
//Private members
86
const
QIcon*
const
invalid_
;
87
std::list<int>
sizes_
;
88
QStringList
icon_dirs_
;
89
HashMap<String, QIcon*>
icon_map_
;
90
91
//Private methods
92
void
setup_();
93
QIcon* loadIcon_(
const
String
& name);
94
};
95
}
96
}
97
98
#endif //BALL_VIEW_KERNEL_ICONLOADER_H
99
Generated by
1.8.3.1