]> SALOME platform Git repositories - modules/shaper.git/blob - src/PartSet/PartSet_CustomPrs.h
Salome HOME
df17bea094ce83c8a5a220bec0af83f1e0286260
[modules/shaper.git] / src / PartSet / PartSet_CustomPrs.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        PartSet_CustomPrs.hxx
4 // Created:     30 Jun 2015
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef PartSet_CustomPrs_H
8 #define PartSet_CustomPrs_H
9
10 #include "PartSet.h"
11
12 #include <ModelAPI_Object.h>
13 #include <ModelAPI_Result.h>
14
15 #include <GeomAPI_ICustomPrs.h>
16 #include <GeomAPI_AISObject.h>
17 #include <GeomAPI_Shape.h>
18
19 #include <QMap>
20 #include <QList>
21
22 class ModuleBase_IWorkshop;
23
24 /**
25 * Interface of a class which can provide specific customization of
26 * object presentation
27 */
28 class PartSet_CustomPrs : public GeomAPI_ICustomPrs
29 {
30 public:
31   PARTSET_EXPORT PartSet_CustomPrs(ModuleBase_IWorkshop* theWorkshop);
32   PARTSET_EXPORT virtual ~PartSet_CustomPrs() {};
33
34   void setCustomized(const ObjectPtr& theObject);
35
36   /// Modifies the given presentation in the custom way.
37   virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
38                                      std::shared_ptr<GeomAPI_ICustomPrs> theCustomPrs);
39 private:
40   ModuleBase_IWorkshop* myWorkshop; /// current workshop
41
42   QMap<ResultPtr, QList<GeomShapePtr> > myCustomized; /// objects, which are customized
43 };
44
45 #endif