Salome HOME
Create icons dependent on a shape of bodies result type
[modules/shaper.git] / src / ModuleBase / ModuleBase_IconFactory.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModuleBase_IconFactory.cpp
4 // Created:     28 Jul 2015
5 // Author:      Vitaly SMETANNIKOV
6
7
8 #include "ModuleBase_IconFactory.h"
9
10 ModuleBase_IconFactory* MYIconFactory = 0;
11
12
13 ModuleBase_IconFactory::ModuleBase_IconFactory()
14 {
15   setFactory(this);
16 }
17
18 void ModuleBase_IconFactory::setFactory(ModuleBase_IconFactory* theFactory)
19 {
20   if (MYIconFactory)
21     delete MYIconFactory;
22   MYIconFactory = theFactory;
23 }
24
25 ModuleBase_IconFactory* ModuleBase_IconFactory::get()
26 {
27   if (!MYIconFactory) {
28     MYIconFactory = new ModuleBase_IconFactory();
29   }
30   return MYIconFactory;
31 }
32
33 QIcon ModuleBase_IconFactory::getIcon(ObjectPtr theIcon)
34 {
35   return QIcon();
36 }