X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPipelineEditor%2FBlock.cxx;h=cd32453cb0c8299d9ec78cdfb7102360b3894c7d;hb=24d0c2ad34de2cbd89fed76058f2995cdf81d239;hp=61938a7b9073545cb81db9700d7bb3af9a3318c5;hpb=f69098bd941d8753926760dead2792584eb95f53;p=cpPlugins.git diff --git a/lib/cpPipelineEditor/Block.cxx b/lib/cpPipelineEditor/Block.cxx index 61938a7..cd32453 100644 --- a/lib/cpPipelineEditor/Block.cxx +++ b/lib/cpPipelineEditor/Block.cxx @@ -9,7 +9,7 @@ #include #include -#include +#include #include "Port.h" #include "Connection.h" @@ -17,7 +17,10 @@ // ------------------------------------------------------------------------- cpPipelineEditor::Block:: -Block( TFilter* filter, QGraphicsItem* parent, QGraphicsScene* scene ) +Block( + TFilter* filter, const QString& name, + QGraphicsItem* parent, QGraphicsScene* scene + ) : Superclass( parent, scene ), m_HorzMargin( 20 ), m_VertMargin( 5 ), @@ -38,7 +41,7 @@ Block( TFilter* filter, QGraphicsItem* parent, QGraphicsScene* scene ) this->m_Height = this->m_VertMargin; // Configure names - this->setNamePort( this->m_Filter->GetName( ) ); + this->setNamePort( name ); this->_setTypeInfo( this->m_Filter->GetClassName( ) ); // Add input ports @@ -287,7 +290,10 @@ contextMenuEvent( QGraphicsSceneContextMenuEvent* evt ) QAction* selectedAction = menu.exec( evt->screenPos( ) ); if( selectedAction == configureAction ) - this->m_Filter->GetParametersDialog( )->exec( ); + { + auto dlg = this->m_Filter->CreateQtDialog( ); + dlg->exec( ); + } else if( selectedAction == updateAction ) this->m_Editor->updateFilter( this->namePort( ).toStdString( ) ); }