Salome HOME
ModuleBase_IconFactory class was created
[modules/shaper.git] / src / ModuleBase / ModuleBase_IconFactory.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModuleBase_IconFactory.h
4 // Created:     28 Jul 2015
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef ModuleBase_IconFactory_H
8 #define ModuleBase_IconFactory_H
9
10 #include "ModuleBase.h"
11 #include <ModelAPI_Object.h>
12 #include <QIcon>
13
14 /**\class ModuleBase_IconFactory
15  * \ingroup GUI
16  * \brief This is a class which provides icons of objects for object browser 
17  */
18 class MODULEBASE_EXPORT ModuleBase_IconFactory
19 {
20 public:
21   /// Returns icons factory instance
22   static ModuleBase_IconFactory* get();
23
24   /// Returns Icon for the given object
25   /// \param theObj an object
26   virtual QIcon getIcon(ObjectPtr theObj);
27
28 protected:
29   /// Set the current icons factory instance
30   /// \param theFactory a new factory
31   static void setFactory(ModuleBase_IconFactory* theFactory);
32 };
33
34 #endif