]> Creatis software - cpPlugins.git/blob - lib/cpBaseQtApplication/Canvas.h
...
[cpPlugins.git] / lib / cpBaseQtApplication / Canvas.h
1 #ifndef __CPBASEQTAPPLICATION__CANVAS__H__
2 #define __CPBASEQTAPPLICATION__CANVAS__H__
3
4 #include <cpBaseQtApplication_Export.h>
5 #include <QtGui/QGraphicsView>
6
7 namespace cpBaseQtApplication
8 {
9   // Some other forward declarations
10   class Block;
11   class Connection;
12   class Editor;
13
14   /**
15    */
16   class cpBaseQtApplication_EXPORT Canvas
17     : public QGraphicsView
18   {
19     Q_OBJECT;
20
21   public:
22     Canvas( QWidget* parent = 0 );
23     virtual ~Canvas( );
24
25     Editor* editor( );
26     const Editor* editor( ) const;
27
28   protected:
29     void keyPressEvent( QKeyEvent* event );
30     void wheelEvent( QWheelEvent* event );
31
32     void dragEnterEvent( QDragEnterEvent* event );
33     void dragLeaveEvent( QDragLeaveEvent* event );
34     void dragMoveEvent( QDragMoveEvent* event );
35     void dropEvent( QDropEvent* event );
36
37     void _scaleView( qreal scaleFactor );
38
39   protected:
40     Editor* m_Editor;
41   };
42
43 } // ecapseman
44
45 #endif // __CPBASEQTAPPLICATION__CANVAS__H__
46
47 // eof - $RCSfile$