graph_analysis
IconManager.hpp
Go to the documentation of this file.
1 #ifndef GRAPH_ANALYSIS_GUI_ICON_MANAGER_HPP
2 #define GRAPH_ANALYSIS_GUI_ICON_MANAGER_HPP
3 
4 #include <base-logging/Singleton.hpp>
5 #include <QIcon>
6 #include <map>
7 #include <string>
8 
9 namespace graph_analysis {
10 namespace gui {
11 
18 class IconManager : public base::Singleton<IconManager>
19 {
20 protected:
22  IconManager();
23  friend class base::Singleton<IconManager>;
24 public:
26  typedef std::map <std::string, QIcon> IconMap;
27 
29  const QIcon* getIcon(const std::string& key);
30 
31  static std::string getIconRootPath();
32 
33 private:
35  IconMap mIconMap;
37  void loadIcon(QIcon& icon, const std::string& file);
38 };
39 
40 
41 } // end namespace gui
42 } // end namespace graph_analysis
43 
44 #endif // GRAPH_ANALYSIS_GUI_ICON_MANAGER_HPP
std::map< std::string, QIcon > IconMap
maps specific access keywords to loaded qt icons
Definition: IconManager.hpp:26
Singleton to load and store handles on all GUI icons.
Definition: IconManager.hpp:18
static std::string getIconRootPath()
Definition: IconManager.cpp:9
const QIcon * getIcon(const std::string &key)
getter method - retrieves a qt icon registered at the given keyword in the icons map ...
Definition: IconManager.cpp:104
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
IconManager()
constructor
Definition: IconManager.cpp:20