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