*/
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
/**
* 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 );
* 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
*/
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
/**
* 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.