]> Creatis software - cpPlugins.git/blob - appli/cpPipelineEditor/Edge.h
4968fb3841e68f29be62bb7ca5185e2637b9cd1b
[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( Node* src, Node* des );
18     virtual ~Edge( );
19
20     Node* sourceNode( ) const;
21     Node* destinationNode( ) const;
22     void adjust( );
23     QRectF boundingRect( ) const;
24     void paint(
25       QPainter* painter,
26       const QStyleOptionGraphicsItem* option,
27       QWidget* widget
28       );
29
30   private:
31     Node* m_Source;
32     Node* m_Destination;
33
34     QPointF m_SourcePoint;
35     QPointF m_DestinationPoint;
36     qreal m_ArrowSize;
37   };
38
39 } // ecapseman
40
41 #endif // __PIPELINEEDITOR__EDGE__H__
42
43 // eof - $RCSfile$