#include <TDF_ListIteratorOfDeltaList.hxx>
#include <QApplication>
+#include <QDir>
HYDROGUI_DataModel::HYDROGUI_DataModel( CAM_Module* theModule )
: LightApp_DataModel( theModule )
bool isMultiFile,
QStringList& theListOfFiles )
{
+ LightApp_DataModel::dumpPython( theURL, theStudy, isMultiFile, theListOfFiles );
+
int aStudyId = theStudy->id();
+ LightApp_Study* aStudy = ::qobject_cast<LightApp_Study*>( theStudy );
Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( aStudyId );
- if( aDocument.IsNull() )
+ if ( aDocument.IsNull() || !aStudy )
return false;
- QString aFileToExport = theURL;
-
- if ( isMultiFile )
- {
- // each module's dump is written into a separate Python file
- }
-
-
- QApplication::setOverrideCursor( Qt::WaitCursor );
+ QString aFileToExport = aStudy->GetTmpDir( theURL.toLatin1().constData(), isMultiFile ).c_str();
+ aFileToExport += QString( QDir::separator() ) + "HYDRO.py";
bool aRes = aDocument->DumpToPython( aFileToExport );
- QApplication::restoreOverrideCursor();
+ if ( aRes )
+ {
+ theListOfFiles.append( aFileToExport );
+ }
return aRes;
}