#include "Port.h"\r
#include "Connection.h"\r
+#include "Block.h"\r
+#include "Editor.h"\r
\r
#include <QGraphicsScene>\r
+#include <QGraphicsSceneContextMenuEvent>\r
#include <QFontMetrics>\r
+#include <QMenu>\r
#include <QPainter>\r
#include <QPen>\r
\r
return( false );\r
}\r
\r
-// -------------------------------------------------------------------------\r
-cpPipelineEditor::TypePort::\r
-TypePort( QGraphicsItem* parent, QGraphicsScene* scene )\r
- : Superclass( parent, scene )\r
-{\r
-}\r
-\r
-// -------------------------------------------------------------------------\r
-cpPipelineEditor::TypePort::\r
-~TypePort( )\r
-{\r
-}\r
-\r
-// -------------------------------------------------------------------------\r
-void cpPipelineEditor::TypePort::\r
-_updateLabels( )\r
-{\r
- QFont font( this->scene( )->font( ) );\r
- font.setItalic( true );\r
- this->m_Label->setFont( font );\r
- this->m_ExtendedLabel->setFont( font );\r
- this->setPath( QPainterPath( ) );\r
-}\r
-\r
-// -------------------------------------------------------------------------\r
-bool cpPipelineEditor::TypePort::\r
-isConnected( Port* other )\r
-{\r
- return( false );\r
-}\r
-\r
// -------------------------------------------------------------------------\r
cpPipelineEditor::InputPort::\r
InputPort( QGraphicsItem* parent, QGraphicsScene* scene )\r
return( value );\r
}\r
\r
+// -------------------------------------------------------------------------\r
+void cpPipelineEditor::OutputPort::\r
+contextMenuEvent( QGraphicsSceneContextMenuEvent* evt )\r
+{\r
+ if( this->m_Block == NULL )\r
+ return;\r
+ \r
+ QMenu menu;\r
+ QAction* showAction = menu.addAction( "Show" );\r
+ QAction* hideAction = menu.addAction( "Hide" );\r
+ QAction* selectedAction = menu.exec( evt->screenPos( ) );\r
+\r
+ if( selectedAction == showAction )\r
+ {\r
+ this->m_Block->editor( )->showOutputData(\r
+ this->m_Block->namePort( ).toStdString( ),\r
+ this->name( ).toStdString( )\r
+ );\r
+ }\r
+ else if( selectedAction == hideAction )\r
+ {\r
+ } // fi\r
+}\r
+\r
// eof - $RCSfile$\r