#include <TDF_Delta.hxx>
#include <TDF_ListIteratorOfDeltaList.hxx>
+#include <QApplication>
+
HYDROGUI_DataModel::HYDROGUI_DataModel( CAM_Module* theModule )
: LightApp_DataModel( theModule )
{
return true;
}
+bool HYDROGUI_DataModel::dumpPython( const QString& theURL,
+ CAM_Study* theStudy,
+ bool isMultiFile,
+ QStringList& theListOfFiles )
+{
+ int aStudyId = theStudy->id();
+
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( aStudyId );
+ if( aDocument.IsNull() )
+ return false;
+
+ QString aFileToExport = theURL;
+
+ if ( isMultiFile )
+ {
+ // each module's dump is written into a separate Python file
+ }
+
+
+ QApplication::setOverrideCursor( Qt::WaitCursor );
+
+ bool aRes = aDocument->DumpToPython( aFileToExport );
+
+ QApplication::restoreOverrideCursor();
+
+ return aRes;
+}
+
bool HYDROGUI_DataModel::isModified() const
{
return getDocument()->IsModified();
*/
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