]> SALOME platform Git repositories - modules/shaper.git/blob - src/PartSet/PartSet_CustomPrs.h
Salome HOME
6d23847da06499aba618bd1afad6c66e11d87b61
[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 #include "PartSet_OperationPrs.h"
12
13 #include <ModelAPI_Object.h>
14 #include <ModelAPI_Result.h>
15 #include <ModelAPI_Feature.h>
16
17 #include <GeomAPI_ICustomPrs.h>
18 #include <GeomAPI_AISObject.h>
19 #include <GeomAPI_Shape.h>
20
21 #include <QMap>
22 #include <QList>
23
24 class ModuleBase_IWorkshop;
25
26 /**
27 * Interface of a class which can provide specific customization of
28 * object presentation
29 */
30 class PartSet_CustomPrs : public GeomAPI_ICustomPrs
31 {
32 public:
33   PARTSET_EXPORT PartSet_CustomPrs(ModuleBase_IWorkshop* theWorkshop);
34   PARTSET_EXPORT virtual ~PartSet_CustomPrs() {};
35
36   /// Set the feature is customized
37   /// \param theObject a feature object
38   void setCustomized(const FeaturePtr& theObject);
39
40   /// Modifies the given presentation in the custom way.
41   virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
42                                      std::shared_ptr<GeomAPI_ICustomPrs> theCustomPrs);
43 private:
44   ModuleBase_IWorkshop* myWorkshop; /// current workshop
45   Handle(PartSet_OperationPrs) myOperationPrs; /// AIS presentation for the feature of operation
46   //QMap<ResultPtr, QList<GeomShapePtr> > myCustomized; /// objects, which are customized
47 };
48
49 #endif