X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2FPipelineEditor%2FPipelineEditor.cxx;h=32a4546eb595f42aef59ca177847a71b5eda2f1f;hb=510ac31d52c1ac725baf278243c958e6c564b5b3;hp=5751a904d68f776f9a632fff29ea7a7a1da9819f;hpb=24d5c00294fc95f6f0d858a35799b77d97055745;p=cpPlugins.git diff --git a/appli/PipelineEditor/PipelineEditor.cxx b/appli/PipelineEditor/PipelineEditor.cxx index 5751a90..32a4546 100644 --- a/appli/PipelineEditor/PipelineEditor.cxx +++ b/appli/PipelineEditor/PipelineEditor.cxx @@ -15,7 +15,6 @@ PipelineEditor( int argc, char* argv[], QWidget* parent ) m_UI( new Ui::PipelineEditor ) { // Basic configuration - this->m_SingleWorkspace = true; this->m_BaseWindowTitle = "PipelineEditor - "; this->m_UI->setupUi( this ); this->setCanvas( this->m_UI->Canvas ); @@ -32,16 +31,14 @@ PipelineEditor( int argc, char* argv[], QWidget* parent ) this->m_UI->Canvas->connectOutputPortSlot( this, SLOT( _slotView( const std::string&, bool ) ) ); + this->connect( + this->m_UI->actionPrintExecutionInformation, SIGNAL( triggered( bool ) ), + this, SLOT( _slotPrintExecutionInformation( bool ) ) + ); // Load command-line given workspace (if any) - this->m_ActiveWS = "empty"; if( argc > 1 ) - { this->_loadWorkspace( argv[ 1 ] ); - this->m_ActiveWS = argv[ 1 ]; - } - else - this->_addWorkspace( this->m_ActiveWS ); } // ------------------------------------------------------------------------- @@ -70,7 +67,7 @@ _slotView( const std::string& name, bool show ) { try { - auto ws = this->workspace( this->m_ActiveWS ); + auto ws = this->workspace( ); auto filter = ws->GetFilter( filter_name ); cpBaseQtApplication_Execute( filter->Update( ) ); auto image = filter->GetOutputData< vtkImageData >( output_name ); @@ -100,7 +97,8 @@ _slotView( const std::string& name, bool show ) } // fi if( dynamic_cast< QWidget* >( viewer ) != - dynamic_cast< QWidget* >( this->m_UI->Viewer ) + dynamic_cast< QWidget* >( this->m_UI->Viewer ) && + viewer != NULL ) { delete this->m_UI->Viewer; @@ -143,6 +141,14 @@ _slotView( const std::string& name, bool show ) } // fi } +// ------------------------------------------------------------------------- +void PipelineEditor:: +_slotPrintExecutionInformation( bool show ) +{ + if( this->m_Workspace.IsNotNull( ) ) + this->m_Workspace->SetPrintExecution( show ); +} + // ------------------------------------------------------------------------- #include cpBaseQtApplication_Main( PipelineEditor );