+// -------------------------------------------------------------------------
+void cpPipelineEditor::
+_ActionSaveWorkspace( )
+{
+ if( this->m_Workspace == NULL )
+ return;
+
+ QFileDialog dlg( this );
+ dlg.setFileMode( QFileDialog::AnyFile );
+ dlg.setDirectory( "." );
+ dlg.setAcceptMode( QFileDialog::AcceptSave );
+ dlg.setNameFilter(
+ QFileDialog::tr( "Workspace file (*.xml);;All files (*)" )
+ );
+ dlg.setDefaultSuffix( QFileDialog::tr( "xml" ) );
+ if( !( dlg.exec( ) ) )
+ return;
+ std::string fname = dlg.selectedFiles( ).at( 0 ).toStdString( );
+
+ std::string err = this->m_Workspace->SaveWorkspace( fname );
+ if( err != "" )
+ QMessageBox::critical(
+ this,
+ QMessageBox::tr( "Error saving workspace" ),
+ QMessageBox::tr( err.c_str( ) )
+ );
+}
+