1 #ifndef __PIPELINEEDITOR__GRAPHCANVAS__H__
2 #define __PIPELINEEDITOR__GRAPHCANVAS__H__
4 #include <QtGui/QGraphicsView>
5 #include <cpExtensions/DataStructures/Graph.h>
7 // Some forward declarations
16 namespace PipelineEditor
18 // Some other forward declarations
25 : public QGraphicsView
31 cpExtensions::DataStructures::Graph< Node*, Edge*, std::string > TGraph;
34 GraphCanvas( QWidget* parent = 0 );
35 virtual ~GraphCanvas( );
37 cpPlugins::Interface::Workspace* workspace( );
38 const cpPlugins::Interface::Workspace* workspace( ) const;
39 void setWorkspace( cpPlugins::Interface::Workspace* ws );
51 void keyPressEvent( QKeyEvent* event );
52 void timerEvent( QTimerEvent* event );
53 void wheelEvent( QWheelEvent* event );
54 void drawBackground( QPainter* painter, const QRectF& rect );
55 void scaleView( qreal scaleFactor );
58 cpPlugins::Interface::Workspace* m_Workspace;
59 TGraph::Pointer m_Graph;
64 #endif // __PIPELINEEDITOR__GRAPHCANVAS__H__