#include <HYDROData_Profile.h>
#include <HYDROData_Entity.h>
#include <HYDROGUI_ObjListBox.h>
-#include <QMessageBox>
+#include <HYDROGUI_Operation.h>
+#include "HYDROGUI_Module.h"
+#include <HYDROData_SinusX.h>
+#include <SUIT_FileDlg.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_Desktop.h>
+
+#include <LightApp_Application.h>
+#include <QApplication>
HYDROGUI_ExportSinusXOp::HYDROGUI_ExportSinusXOp( HYDROGUI_Module* theModule )
: HYDROGUI_Operation( theModule )
void HYDROGUI_ExportSinusXOp::onExportItems()
{
+ QString aFilter( tr("SINUSX_FILTER") );
HYDROGUI_ExportSinusXDlg* aPanel = ::qobject_cast<HYDROGUI_ExportSinusXDlg*>( inputPanel() );
if ( !aPanel )
return;
- int T = aPanel->GetSelectedEntities().Size();
+ if (!aPanel->GetSelectedEntities().IsEmpty())
+ {
+ //Export selected items to SX file
+ QString aFileName = SUIT_FileDlg::getFileName( module()->getApp()->desktop(), "", aFilter, tr( "EXPORT_SINUSX" ), false );
+ HYDROData_SinusX anExporter;
+ anExporter.Export(aFileName, aPanel->GetSelectedEntities());
+ }
+ else
+ SUIT_MessageBox::warning(module()->getApp()->desktop(), tr( "EXPORT_SINUSX" ), tr( "NO_ENTITIES_TO_EXPORT"));
}