Salome HOME
Modify creation of curves: 1) using QDockWidget instead of QDialog; 2) selection...
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_DataModel.h
index 9b08ac8d6deb7469ec39ce8ca3b4d0fb6b5d5c72..1f2f3fb23f1a472254eb4afd28109ae29ddb7247 100644 (file)
@@ -80,6 +80,14 @@ public:
    */
   virtual bool close();
 
+  /**
+   * Dump study data to Python script. Reimplemented.
+   */
+  virtual bool                        dumpPython( const QString& theURL,
+                                                  CAM_Study*     theStudy,
+                                                  bool           isMultiFile,
+                                                  QStringList&   theListOfFiles );
+
   /**
    * Returns modification status. Reimplemented.
    * \return boolean value of modification status
@@ -101,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 );
 
@@ -140,7 +148,7 @@ public:
    * Find a data object by the specified entry and kind
    */
   Handle(HYDROData_Object) objectByEntry( const QString& theEntry,
-                                          const ObjectKind theObjectKind );
+                                          const ObjectKind theObjectKind = KIND_UNKNOWN );
 
   /**
    * Check if it is possible to perform 'undo' operation
@@ -182,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
@@ -191,18 +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,
-                                     Handle(HYDROData_Object) theModelObject );
+  LightApp_DataObject* createObject( SUIT_DataObject*         theParent,
+                                     Handle(HYDROData_Object) theModelObject,
+                                     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.