X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_TreeNodes.h;h=983ef396b6712d6bdf28d1eb86c0be1d13e3c782;hb=b3f7b461d00b6ddf3736c8284498a9f33428577c;hp=4e37df89cf8c9eebf0fce08f6d1b497a3070cacb;hpb=39bb14c5ae7df11b8c788ab0037ba5b893267204;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_TreeNodes.h b/src/PartSet/PartSet_TreeNodes.h index 4e37df89c..983ef396b 100644 --- a/src/PartSet/PartSet_TreeNodes.h +++ b/src/PartSet/PartSet_TreeNodes.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_TreeNodes_H @@ -38,6 +37,9 @@ public: /// Returns the node representation according to theRole. virtual QVariant data(int theColumn, int theRole) const; + + // Returns color of the Item when it is active + virtual QColor activeItemColor() const; }; /** @@ -91,6 +93,9 @@ public: virtual ObjectPtr subObject(int theId) const; + // Returns color of the Item when it is active + virtual QColor activeItemColor() const; + protected: ObjectPtr myObject; }; @@ -329,11 +334,6 @@ public: /// Returns the node representation according to theRole. virtual QVariant data(int theColumn, int theRole) const; - -private: - FeaturePtr getFeature(const std::string& theId) const; - - void getFirstAndLastIndex(int& theFirst, int& theLast) const; }; @@ -342,11 +342,11 @@ private: * \ingroup Modules * Implementation of a node for compsolid representation */ -class PartSet_StepNode : public PartSet_TreeNode +class PartSet_StepNode : public PartSet_ObjectNode { public: - PartSet_StepNode(ModelAPI_Entity* theEnt, ModuleBase_ITreeNode* theParent) : - PartSet_TreeNode(theParent), myEntity(theEnt) {} + PartSet_StepNode(const ObjectPtr& theObj, ModuleBase_ITreeNode* theParent) : + PartSet_ObjectNode(theObj, theParent) {} static std::string typeId() { @@ -359,16 +359,7 @@ public: /// Returns the node representation according to theRole. virtual QVariant data(int theColumn, int theRole) const; - ModelAPI_Entity* entity() const { - return myEntity; - } - - void setEntity(ModelAPI_Entity* theEnt) { - myEntity = theEnt; - } - -private: - ModelAPI_Entity* myEntity; + virtual VisibilityState visibilityState() const; }; #endif