Salome HOME
Modify creation of curves: 1) using QDockWidget instead of QDialog; 2) selection...
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_DataModel.h
index 1c5de1d7d7534bb2a77804c5713c163ddf079ccc..1f2f3fb23f1a472254eb4afd28109ae29ddb7247 100644 (file)
@@ -109,14 +109,14 @@ public:
   /**
    * Returns data object corresponding to the model object.
    * \param the data model object
-   * \returns the only one object referenced to the given data model object, or null if not found
+   * \return the only one object referenced to the given data model object, or null if not found
    */
   virtual HYDROGUI_DataObject* getDataObject( const Handle(HYDROData_Object)& theModelObject );
 
   /**
    * Returns a data object referenced to the given data object.
    * \param the data object
-   * \returns the object referenced to the given object, or null if not found
+   * \return the object referenced to the given object, or null if not found
    */
   virtual HYDROGUI_DataObject* getReferencedDataObject( HYDROGUI_DataObject* theObject );
 
@@ -190,6 +190,38 @@ public:
    */
   bool redo();
 
+  /**
+   * Check if it is possible to perform 'copy' operation
+   */
+  bool canCopy();
+
+  /**
+   * Check if it is possible to perform 'paste' operation
+   */
+  bool canPaste();
+
+  /**
+   * Perform the 'copy' operation
+   */
+  bool copy();
+
+  /**
+   * Perform the 'paste' operation
+   */
+  bool paste();
+
+  /**
+   * Update the sequence of the objects to be copied
+   */
+  static void changeCopyingObjects( const HYDROData_SequenceOfObjects& );
+
+  /**
+   * Returns name of the partition containing the objects of the specified kind
+   * \param theObjectKind kind of objects
+   * \return partition name
+   */
+  static QString partitionName( const ObjectKind theObjectKind );
+
 protected:
   /**
    * Returns the document for the current study
@@ -199,19 +231,33 @@ protected:
   /**
    * 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 theObject model object
+   * \param theModelObject model object
+   * \param theParentEntry entry of parent object
    */
-  LightApp_DataObject* createObject( SUIT_DataObject* theParent,
+  LightApp_DataObject* createObject( SUIT_DataObject*         theParent,
                                      Handle(HYDROData_Object) theModelObject,
-                                     const QString& theParentEntry = QString() );
+                                     const QString&           theParentEntry = QString(),
+                                     const bool               theIsBuildTree = true );
 
   /**
    * Creates the GUI data object without corresponding model object: just by name
    * \param theParent a created object will be appended as a child of this object
    * \param theName name of this object
+   * \param theParentEntry entry of parent object
    */
   LightApp_DataObject* createObject( SUIT_DataObject* theParent,
-                                     const QString& theName );
+                                     const QString&   theName,
+                                     const QString&   theParentEntry = QString() );
+
+  /**
+   * 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
+   */
+  void                 buildObjectTree( SUIT_DataObject* theParent,
+                                        SUIT_DataObject* theObject,
+                                        const QString&   theParentEntry = QString() );
 
   /**
    * Removes data object from the tree.