]> Creatis software - cpPlugins.git/blob - libs/cpPipelineEditor/Block.h
d06964a73bffe3e64e138b420f46ff1d36e15e86
[cpPlugins.git] / libs / cpPipelineEditor / Block.h
1 #ifndef __cpPipelineEditor__Block__h__
2 #define __cpPipelineEditor__Block__h__
3
4 #include <cpPipelineEditor_Export.h>
5 #include <QGraphicsPathItem>
6
7 namespace cpPipelineEditor
8 {
9   /**
10    */
11   class cpPipelineEditor_EXPORT Block
12     : public QGraphicsPathItem
13   {
14   public:
15     typedef Block             Self;
16     typedef QGraphicsPathItem Superclass;
17
18   public:
19     Block(
20       QGraphicsItem* parent = NULL, QGraphicsScene* scene = NULL
21       );
22     virtual ~Block( );
23
24     void setClassName( const std::string& name );
25     void setObjectName( const std::string& name );
26     void setNumberOfInputs( unsigned int n );
27     void setNumberOfOutputs( unsigned int n );
28     void setNumberOfParameters( unsigned int n );
29
30     virtual void paint(
31       QPainter* painter,
32       const QStyleOptionGraphicsItem* option,
33       QWidget* widget
34       ) override;
35
36   protected:
37     QColor m_SelectedColor;
38     QColor m_NotSelectedColor;
39   };
40
41 } // ecapseman
42
43 #endif // __cpPipelineEditor__Block__h__
44
45 // eof - $RCSfile$