Salome HOME
17.12.2013. Added Partition algorithm (draft version).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_DataModel.h
index 060a3db56936e155a39dc47c94da2856ac9c7488..077905a5ff96fdb811f9bf422d5b2cd27ad57a29 100644 (file)
@@ -221,14 +221,24 @@ public:
   bool paste();
 
   /**
-   * Creates the GUI data object according to the model object.
-   * \param theParent a created object will be appended as a child of this object
-   * \param theModelObject model object
-   * \param theParentEntry entry of parent object
+   * Rename the object
+   */
+  bool rename( Handle(HYDROData_Entity) theEntity, const QString& theName );
+
+  /**
+   * Creates the Calculation Case subtree for usage within an operation dialog.
+   * \param theParent a created object will be appended as a child of this GUI object
+   * \param theCase the calculation case model object
    */
   void buildCaseTree( SUIT_DataObject*                  theParent,
                       Handle(HYDROData_CalculationCase) theCase );
 
+  /**
+   * Updates the object subtree.
+   * \param theObj the data model entity
+   */
+  void updateObjectTree( Handle(HYDROData_Entity)& theObj );
+
   /**
    * Update the sequence of the objects to be copied
    */
@@ -275,30 +285,52 @@ protected:
    * \param theObject the GUI object
    * \param theParentEntry the entry of parent object
    * \param theIsBuildTree if true then build the subtree of the GUI object
+   * \param theIsInOperation if true then the tree is used for a browser within an operation, it is false by default
    */
   LightApp_DataObject* buildObject( SUIT_DataObject*     theParent,
                                     HYDROGUI_DataObject* theObject,
                                     const QString&       theParentEntry,
-                                    const bool           theIsBuildTree );
+                                    const bool           theIsBuildTree,
+                                    const bool           theIsInOperation = false );
 
+  /**
+   * Build object tree if the flag theIsBuildTree is true. 
+   * \param theParent a created object will be appended as a child of this GUI object
+   * \param theModelObject the data model zone object
+   * \param theParentEntry the entry of parent object
+   * \param theIsBuildTree if true then build the subtree of the GUI object
+   * \param theIsInOperation if true then the tree is used for a browser within an operation, it is false by default
+   */
   LightApp_DataObject* createZone( SUIT_DataObject*       theParent,
                                    Handle(HYDROData_Zone) theModelObject,
                                    const QString&         theParentEntry,
-                                   const bool             theIsBuildTree );
+                                   const bool             theIsBuildTree ,
+                                   const bool             theIsInOperation = false  );
 
+  /**
+   * Build object tree if the flag theIsBuildTree is true. 
+   * \param theParent a created object will be appended as a child of this GUI object
+   * \param theModelObject the data model region object
+   * \param theParentEntry the entry of parent object
+   * \param theIsBuildTree if true then build the subtree of the GUI object
+   * \param theIsInOperation if true then the tree is used for a browser within an operation, it is false by default
+   */
   LightApp_DataObject* createRegion( SUIT_DataObject*         theParent,
                                      Handle(HYDROData_Region) theModelObject,
                                      const QString&           theParentEntry,
-                                     const bool               theIsBuildTree );
+                                     const bool               theIsBuildTree ,
+                                     const bool               theIsInOperation = false );
   /**
-   * Build tree of model object.
+   * Build tree of model object.
    * \param theParent a created object will be appended as a child of this object
    * \param theObject gui object for which the tree will be build
    * \param theParentEntry entry of parent object
+   * \param theIsInOperation if true then the tree is used for a browser within an operation, it is false by default
    */
   void                 buildObjectTree( SUIT_DataObject* theParent,
                                         SUIT_DataObject* theObject,
-                                        const QString&   theParentEntry = QString() );
+                                        const QString&   theParentEntry = QString(),
+                                        const bool       theIsInOperation = false );
 
   /**
    * Removes data object from the tree.