]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSet/PartSet_TreeNodes.h
Salome HOME
Compsolid nodes added
[modules/shaper.git] / src / PartSet / PartSet_TreeNodes.h
index 56aada4d8b9ded7b89e33a67254e6ea1df247c64..7ab9337ad70781455ec2ca568749791e0070202a 100644 (file)
@@ -67,6 +67,10 @@ public:
   /// Returns object referenced by the node (can be null)
   virtual ObjectPtr object() const { return myObject; }
 
+  /// Sets an object to the node
+  /// theObj a new object
+  void setObject(ObjectPtr theObj) { myObject = theObj; }
+
   /// Updates sub-nodes of the node
   virtual void update() {}
 
@@ -137,6 +141,8 @@ public:
 private:
   std::string groupName() const;
 
+  ModuleBase_ITreeNode* createNode(const ObjectPtr& theObj);
+
   FolderType myType;
 };
 
@@ -312,4 +318,38 @@ private:
   void getFirstAndLastIndex(int& theFirst, int& theLast) const;
 };
 
-#endif
\ No newline at end of file
+
+/////////////////////////////////////////////////////////////////////
+/**
+* \ingroup Modules
+* Implementation of a node for compsolid representation
+*/
+class PartSet_CompsolidNode : public PartSet_ObjectNode
+{
+public:
+  PartSet_CompsolidNode(const ObjectPtr& theObj, ModuleBase_ITreeNode* theParent);
+
+  static std::string typeId()
+  {
+    static std::string myType = "CompSolid";
+    return myType;
+  }
+
+  virtual std::string type() const { return typeId(); }
+
+  /// Updates sub-nodes of the node
+  virtual void update();
+
+  /// Process creation of objects.
+  /// \param theObjects a list of created objects
+  /// \return a list of nodes which corresponds to the created objects
+  virtual QTreeNodesList objectCreated(const QObjectPtrList& theObjects);
+
+  /// Process deletion of objects.
+  /// \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);
+
+};
+
+#endif