]> Creatis software - cpPlugins.git/blob - appli/cpPipelineEditor/Edge.h
More on graph editor
[cpPlugins.git] / appli / cpPipelineEditor / Edge.h
1 #ifndef __PIPELINEEDITOR__EDGE__H__
2 #define __PIPELINEEDITOR__EDGE__H__
3
4 #include <QGraphicsItem>
5
6 namespace PipelineEditor
7 {
8   // Some forward declarations
9   class Node;
10
11   /**
12    */
13   class Edge
14     : public QGraphicsItem
15   {
16   public:
17     Edge(
18       const Node* nsrc, const Node* ndes,
19       const QRectF* rsrc, const QRectF* rdes
20       );
21     virtual ~Edge( );
22
23     const QRectF* source( ) const;
24     const QRectF* destination( ) const;
25     void adjust( );
26     QRectF boundingRect( ) const;
27     void paint(
28       QPainter* painter,
29       const QStyleOptionGraphicsItem* option,
30       QWidget* widget
31       );
32
33   private:
34     const Node* m_SrcNode;
35     const Node* m_DesNode;
36     const QRectF* m_SrcRect;
37     const QRectF* m_DesRect;
38   };
39
40 } // ecapseman
41
42 #endif // __PIPELINEEDITOR__EDGE__H__
43
44 // eof - $RCSfile$