Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VTKViewer_RenderWindow.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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, or (at your option) any later version.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 #ifndef VTKVIEWER_RENDERWINDOW_H
24 #define VTKVIEWER_RENDERWINDOW_H
25 
26 #include "VTKViewer.h"
27 
28 #include <vtkRenderWindow.h>
29 
30 #include <QWidget>
31 
33 {
34  Q_OBJECT
35 
36 public:
37  /* popup management */
38  //void onCreatePopup();
39 
40 // const char *GetClassName() {return "VTKViewer_RenderWindow";};
41 
42 public:
43  VTKViewer_RenderWindow(QWidget *parent, const char *name);
44  virtual ~VTKViewer_RenderWindow() ;
45 
47  vtkRenderWindow* getRenderWindow() { return myRW; }
48 
49  virtual QPaintEngine* paintEngine() const;
50 
51  protected:
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 );
63 
64  signals:
66  void MouseMove( QMouseEvent* );
68  void MouseButtonPressed( QMouseEvent* );
70  void MouseButtonReleased( QMouseEvent* );
72  void MouseDoubleClicked( QMouseEvent* );
74  void WheelMoved( QWheelEvent* );
76  void LeftButtonPressed(const QMouseEvent *event) ;
78  void LeftButtonReleased(const QMouseEvent *event) ;
80  void MiddleButtonPressed(const QMouseEvent *event) ;
82  void MiddleButtonReleased(const QMouseEvent *event) ;
84  void RightButtonPressed(const QMouseEvent *event) ;
86  void RightButtonReleased(const QMouseEvent *event) ;
87 
89  void ButtonPressed(const QMouseEvent *event);
91  void ButtonReleased(const QMouseEvent *event);
93  void KeyPressed( QKeyEvent* );
95  void KeyReleased( QKeyEvent* );
97  void contextMenuRequested( QContextMenuEvent *e );
98 
99  protected:
100  vtkRenderWindow* myRW;
101 };
102 
103 #endif