1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef VTKVIEWER_RENDERWINDOW_H
20 #define VTKVIEWER_RENDERWINDOW_H
22 #include "VTKViewer.h"
24 #include <vtkRenderWindow.h>
28 class VTKVIEWER_EXPORT VTKViewer_RenderWindow : public QWidget
33 /* popup management */
34 //void onCreatePopup();
36 // const char *GetClassName() {return "VTKViewer_RenderWindow";};
39 VTKViewer_RenderWindow(QWidget *parent, const char *name);
40 virtual ~VTKViewer_RenderWindow() ;
42 /*!Get render window pointer.*/
43 vtkRenderWindow* getRenderWindow() { return myRW; }
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 );
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) ;
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 );
94 vtkRenderWindow* myRW;