Salome HOME
Create icons dependent on a shape of bodies result type
[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   ModuleBase_IconFactory();
30
31   /// Set the current icons factory instance
32   /// \param theFactory a new factory
33   static void setFactory(ModuleBase_IconFactory* theFactory);
34 };
35
36 #endif