Salome HOME
Copyright update 2022
[modules/shaper.git] / src / PartSet / PartSet_CustomPrs.h
index 6b31fdabe9a700e2f8fcd6f4a3177837b54834dd..ad8849e0e91d91a3bb6873256b4c3e6910f7179a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -98,6 +98,16 @@ public:
   /// it caused erroneus case because the presentation has linkage to the previous context.
   void clearPrs();
 
+  /// Disable displaying of custom mode
+  /// \param theMode a mode to disable
+  void disableCustomMode(ModuleBase_IModule::ModuleBase_CustomizeFlag theMode) {
+    myDisabledMode = theMode;
+    erasePresentation(theMode, false);
+  }
+
+  /// Enables disabled custom mode
+  void enableCustomModes() { myDisabledMode = -1; }
+
   //! Redefinition of Events_Listener method to listen a moment that the presentation becomes empty
   virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
@@ -141,14 +151,21 @@ private:
   /// \return theShapeColor a color
   Quantity_Color getShapeColor(const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag);
 
+  /// Removes error shapes presentation
+  void clearErrorShape();
+
 private:
-  bool myPresentationIsEmpty; /// Boolean state about empty presentation
-  FeaturePtr myFeature; /// Reference to a feature object
   ModuleBase_IWorkshop* myWorkshop; /// current workshop
+  FeaturePtr myFeature; /// Reference to a feature object
+  bool myPresentationIsEmpty; /// Boolean state about empty presentation
   /// 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;
+
+  int myDisabledMode;
+
+  Handle(AIS_Shape) myErrorShapes;
 };
 
 #endif