X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FcpPipelineEditor%2FPort.cxx;h=a2125f7383330bf2082ece043a3b8ec03339fb1b;hb=19a9e1774044cc32c415ad38695800c1d169820d;hp=ab478c298343960aa6bd064649c0fef71a5d4869;hpb=46f2cf7aa39bda8301b22fcfddd43daf0dc13770;p=cpPlugins.git diff --git a/lib/cpPipelineEditor/Port.cxx b/lib/cpPipelineEditor/Port.cxx index ab478c2..a2125f7 100644 --- a/lib/cpPipelineEditor/Port.cxx +++ b/lib/cpPipelineEditor/Port.cxx @@ -1,8 +1,12 @@ #include "Port.h" #include "Connection.h" +#include "Block.h" +#include "Editor.h" #include +#include #include +#include #include #include @@ -292,4 +296,28 @@ itemChange( GraphicsItemChange change, const QVariant& value ) return( value ); } +// ------------------------------------------------------------------------- +void cpPipelineEditor::OutputPort:: +contextMenuEvent( QGraphicsSceneContextMenuEvent* evt ) +{ + if( this->m_Block == NULL ) + return; + + QMenu menu; + QAction* showAction = menu.addAction( "Show" ); + QAction* hideAction = menu.addAction( "Hide" ); + QAction* selectedAction = menu.exec( evt->screenPos( ) ); + + if( selectedAction == showAction ) + { + this->m_Block->editor( )->showOutputData( + this->m_Block->namePort( ).toStdString( ), + this->name( ).toStdString( ) + ); + } + else if( selectedAction == hideAction ) + { + } // fi +} + // eof - $RCSfile$