]> Creatis software - cpPlugins.git/blobdiff - appli/cpPipelineEditor/QNEBlock.cxx
...
[cpPlugins.git] / appli / cpPipelineEditor / QNEBlock.cxx
index 071effc1077bf48a23f420f4514a9987938b043d..5d6f16c4e6b1e674ae0c49e8ab7c6608de89cbe2 100644 (file)
 \r
 // -------------------------------------------------------------------------\r
 PipelineEditor::QNEBlock::\r
-QNEBlock( QGraphicsItem* parent, QGraphicsScene* scene )\r
+QNEBlock( TFilter* filter, QGraphicsItem* parent, QGraphicsScene* scene )\r
   : Superclass( parent, scene ),\r
     m_HorzMargin( 20 ),\r
     m_VertMargin( 5 ),\r
     m_NamePort( NULL ),\r
-    m_TypePort( NULL )\r
+    m_TypePort( NULL ),\r
+    m_Filter( filter )\r
 {\r
   QPainterPath p;\r
   p.addRoundedRect( -50, -15, 100, 30, 5, 5 );\r
@@ -69,6 +70,7 @@ setNamePort( const QString& txt )
   if( this->m_NamePort == NULL )\r
     this->m_NamePort = new QNENamePort( this );\r
   this->m_NamePort->setName( txt );\r
+  this->m_Filter->SetName( txt.toStdString( ) );\r
   this->_configPort( this->m_NamePort );\r
 }\r
 \r
@@ -121,7 +123,7 @@ ports( )
 PipelineEditor::QNEBlock* PipelineEditor::QNEBlock::\r
 clone( )\r
 {\r
-  QNEBlock* b = new QNEBlock( 0, this->scene( ) );\r
+  QNEBlock* b = new QNEBlock( this->m_Filter, 0, this->scene( ) );\r
   foreach( QGraphicsItem* i, this->childItems( ) )\r
   {\r
     QNENamePort* np = dynamic_cast< QNENamePort* >( i );\r