]> SALOME platform Git repositories - modules/gui.git/blob - src/VTKViewer/VTKViewer_RenderWindow.h
Salome HOME
c83b0307ec1db995dfc4aaa257f15118e415a4ad
[modules/gui.git] / src / VTKViewer / VTKViewer_RenderWindow.h
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either 
6 // version 2.1 of the License.
7 // 
8 // This library is distributed in the hope that it will be useful 
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public  
14 // License along with this library; if not, write to the Free Software 
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/
18 //
19 #ifndef VTKVIEWER_RENDERWINDOW_H
20 #define VTKVIEWER_RENDERWINDOW_H
21
22 #include "VTKViewer.h"
23
24 #include <vtkRenderWindow.h>
25
26 #include <qwidget.h>
27
28 class VTKVIEWER_EXPORT VTKViewer_RenderWindow : public QWidget 
29 {
30   Q_OBJECT 
31
32 public:
33   /* popup management */
34   //void                     onCreatePopup();
35
36 //  const char *GetClassName() {return "VTKViewer_RenderWindow";};
37
38 public:
39   VTKViewer_RenderWindow(QWidget *parent, const char *name);
40   virtual ~VTKViewer_RenderWindow() ;
41   
42   /*!Get render window pointer.*/
43   vtkRenderWindow* getRenderWindow() { return myRW; }
44
45  protected:
46   virtual void mouseMoveEvent( QMouseEvent* );
47   virtual void mousePressEvent( QMouseEvent* );
48   virtual void mouseReleaseEvent( QMouseEvent* );
49   virtual void mouseDoubleClickEvent( QMouseEvent* );
50   virtual void wheelEvent( QWheelEvent* );
51   virtual void keyPressEvent( QKeyEvent* );
52   virtual void keyReleaseEvent( QKeyEvent* );
53   virtual void paintEvent( QPaintEvent* );
54   virtual void resizeEvent( QResizeEvent* );
55   virtual void onChangeBackgroundColor();
56   virtual void contextMenuEvent( QContextMenuEvent * e );
57
58  signals:
59   /*!On mouse move signal.*/
60   void MouseMove( QMouseEvent* );
61   /*!On mouse button pressed signal.*/
62   void MouseButtonPressed( QMouseEvent* );
63   /*!On mouse button released signal.*/
64   void MouseButtonReleased( QMouseEvent* );
65   /*!On mouse double click signal.*/
66   void MouseDoubleClicked( QMouseEvent* );
67   /*!On wheel moved signal.*/
68   void WheelMoved( QWheelEvent* );
69   /*!On left button pressed signal.*/
70   void LeftButtonPressed(const QMouseEvent *event) ;
71   /*!On left button released signal.*/
72   void LeftButtonReleased(const QMouseEvent *event) ;
73   /*!On middle button pressed signal.*/
74   void MiddleButtonPressed(const QMouseEvent *event) ;
75   /*!On middle button released signal.*/
76   void MiddleButtonReleased(const QMouseEvent *event) ;
77   /*!On right button pressed signal.*/
78   void RightButtonPressed(const QMouseEvent *event) ;
79   /*!On right button released signal.*/
80   void RightButtonReleased(const QMouseEvent *event) ;
81   
82   /*!On button pressed signal.*/
83   void ButtonPressed(const QMouseEvent *event);
84   /*!On button released signal.*/
85   void ButtonReleased(const QMouseEvent *event);
86   /*!On key pressed signal.*/
87   void KeyPressed( QKeyEvent* );
88   /*!On key released signal.*/
89   void KeyReleased( QKeyEvent* );
90   /*!On content menu requested signal.*/
91   void contextMenuRequested( QContextMenuEvent *e );
92
93  protected:
94   vtkRenderWindow* myRW;
95 };
96
97 #endif