Salome HOME
Delete key regression corrections: in previous implementation sketch entities did...
[modules/shaper.git] / src / PartSet / PartSet_CustomPrs.h
index b235e19c0f3287af11c524394a9627260cee8878..da5c247732bac633cb78f7fb553a6a7bb51f4a0c 100755 (executable)
@@ -45,18 +45,24 @@ public:
   PARTSET_EXPORT virtual ~PartSet_CustomPrs() {};
 
   /// Returns true if the presentation is active
-  bool isActive();
+  /// \param theFlag an object AIS presentation type
+  bool isActive(const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag);
 
   /// Initializes the operation presentation by the parameter object and display the presentation
   /// \param theObject an operation feature source to fill the presentation
+  /// \param theFlag an object AIS presentation type
   /// \param theUpdateViewer the parameter whether the viewer should be update immediatelly
   /// \returns true if the presentation is displayed
-  bool activate(const FeaturePtr& theObject, const bool theUpdateViewer);
+  bool activate(const FeaturePtr& theObject,
+                const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag,
+                const bool theUpdateViewer);
 
   /// Initializes the operation presentation by empty object and erase the presentation
   /// \param theUpdateViewer the parameter whether the viewer should be update immediatelly
+  /// \param theFlag an object AIS presentation type
   /// \returns true if the presentation has been displayed and now it is erased
-  bool deactivate(const bool theUpdateViewer);
+  bool deactivate(const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag,
+                  const bool theUpdateViewer);
 
   /// If the presentation is active[displayed], the shapes of the presentation is recomputed
   /// and the presentation is redisplayed.
@@ -103,13 +109,21 @@ private:
   /// Nullify the operation presentation. For example, it can be useful when the viewer/context
   /// is closed. If this is not performed and the presentation is assigned in another context,
   /// it caused erroneus case because the presentation has linkage to the previous context.
+  /// \param theFlag an object AIS presentation type
   void clearPresentation(const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag);
 
+  /// Returns presentation color according to the flag
+  /// \param theFlag an object AIS presentation type
+  /// \return theShapeColor a color
+  Quantity_Color getShapeColor(const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag);
+
 private:
-  bool myIsActive;
+  FeaturePtr myFeature; /// Reference to a feature object
   ModuleBase_IWorkshop* myWorkshop; /// current workshop
   /// map of presentation type to AIS object
   QMap<ModuleBase_IModule::ModuleBase_CustomizeFlag, AISObjectPtr> myPresentations;
+  /// State whether the presentation is activated/deactivated
+  QMap<ModuleBase_IModule::ModuleBase_CustomizeFlag, bool> myIsActive;
 };
 
 #endif