Salome HOME
updated copyright message
[modules/shaper.git] / src / PartSet / PartSet_TreeNodes.h
index 014c5895d4d0bb8cd9f28ff61f7247335c9cb34f..f00fa9b41cac2db56dcf1c5c9e907b1eae58b9a5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  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
@@ -37,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;
 };
 
 /**
@@ -90,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;
 };
@@ -325,6 +331,9 @@ public:
   /// \param theDoc a document where objects were deleted
   /// \param theGroup a name of group where objects were deleted
   virtual QTreeNodesList objectsDeleted(const DocumentPtr& theDoc, const QString& theGroup);
+
+  /// Returns the node representation according to theRole.
+  virtual QVariant data(int theColumn, int theRole) const;
 };
 
 
@@ -333,11 +342,11 @@ public:
 * \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()
   {
@@ -350,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