X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPartSet%2FPartSet_CustomPrs.h;h=ad8849e0e91d91a3bb6873256b4c3e6910f7179a;hb=64bd95cebe79a5639800635efb7b0d21f13c079c;hp=c0254161111fea1d36aa296b316c4d9694953bef;hpb=7074394f8f08413d885f63be01df6bd5007b868c;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_CustomPrs.h b/src/PartSet/PartSet_CustomPrs.h old mode 100755 new mode 100644 index c02541611..ad8849e0e --- a/src/PartSet/PartSet_CustomPrs.h +++ b/src/PartSet/PartSet_CustomPrs.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 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 @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef PartSet_CustomPrs_H @@ -55,6 +54,9 @@ public: /// Returns color lighter than sketch feature entity : pink static const std::string OPERATION_REMOVE_FEATURE_COLOR() { return "255, 174, 201"; } + + /// Returns color equal to default color of construction plugin : green + static const std::string OPERATION_SKETCH_PLANE() { return "170,255,0"; } public: /// Constructor /// \param theWorkshop a reference to workshop @@ -96,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& theMessage); @@ -139,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 myPresentations; /// State whether the presentation is activated/deactivated QMap myIsActive; + + int myDisabledMode; + + Handle(AIS_Shape) myErrorShapes; }; #endif