X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpBaseQtApplication%2FPort.h;h=45d1fe95ef67dd744c08043636f84c930f0a0c57;hb=db0a767418f78b371c1e4fb0db00e6b75df74ff3;hp=1f6bda1289c84a196801648df445a238e7637451;hpb=49d2d7db538d60008b9a5701ea8f26bb19997a82;p=cpPlugins.git diff --git a/lib/cpBaseQtApplication/Port.h b/lib/cpBaseQtApplication/Port.h index 1f6bda1..45d1fe9 100644 --- a/lib/cpBaseQtApplication/Port.h +++ b/lib/cpBaseQtApplication/Port.h @@ -101,7 +101,11 @@ namespace cpBaseQtApplication enum { Type = Superclass::Type + 3 }; public: - InputPort( QGraphicsItem* parent = NULL, QGraphicsScene* scene = NULL ); + InputPort( + QGraphicsItem* parent, + bool multiple, + QGraphicsScene* scene = NULL + ); virtual ~InputPort( ); virtual void setExtend( bool extend ); @@ -111,19 +115,22 @@ namespace cpBaseQtApplication { return( this->Type ); } void setConnection( Connection* c ); - inline Connection* connection( ) - { return( this->m_Connection ); } - inline const Connection* connection( ) const - { return( this->m_Connection ); } + inline Connection* connection( unsigned int i ) + { return( this->m_Connection[ i ] ); } + inline const Connection* connection( unsigned int i ) const + { return( this->m_Connection[ i ] ); } inline bool hasConnection( ) const - { return( this->m_Connection != NULL ); } + { return( this->m_Connection.size( ) > 0 ); } + inline bool isMultiple( ) const + { return( this->m_IsMultiple ); } protected: QVariant itemChange( GraphicsItemChange change, const QVariant& value ); virtual void _updateLabels( ); protected: - Connection* m_Connection; + std::vector< Connection* > m_Connection; + bool m_IsMultiple; }; /**