This file is indexed.

/usr/include/vtk-6.3/QVTKWidget2.h is in libvtk6-qt-dev 6.3.0+dfsg1-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    QVTKWidget2.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
// .NAME QVTKWidget2 - Display a vtkRenderWindow in a Qt's QGLWidget.
// .SECTION Description
// QVTKWidget2 provides a way to display VTK data in a Qt OpenGL widget.

#ifndef Q_VTK_WIDGET2_H
#define Q_VTK_WIDGET2_H

#include "vtkGUISupportQtOpenGLModule.h" // For export macro
#include <QtOpenGL/QGLWidget>
#include "vtkSmartPointer.h"
#include "QVTKWin32Header.h"

class vtkGenericOpenGLRenderWindow;
class vtkEventQtSlotConnect;
class QVTKInteractorAdapter;
class QVTKInteractor;
class vtkObject;

#include "vtkTDxConfigure.h" // defines VTK_USE_TDX
#ifdef VTK_USE_TDX
class vtkTDxDevice;
#endif

//! QVTKWidget2 displays a VTK window in a Qt window.
class VTKGUISUPPORTQTOPENGL_EXPORT QVTKWidget2 : public QGLWidget
{
  Q_OBJECT
  typedef QGLWidget Superclass;
public:
  //! constructor
  QVTKWidget2(QWidget* parent = NULL, const QGLWidget* shareWidget=0, Qt::WindowFlags f = 0);
  QVTKWidget2(QGLContext* ctx, QWidget* parent = NULL, const QGLWidget* shareWidget=0, Qt::WindowFlags f = 0);
  QVTKWidget2(const QGLFormat& fmt, QWidget* parent = NULL, const QGLWidget* shareWidget=0, Qt::WindowFlags f = 0);
  //! destructor
  virtual ~QVTKWidget2();

  // Description:
  // Set the vtk render window, if you wish to use your own vtkRenderWindow
  virtual void SetRenderWindow(vtkGenericOpenGLRenderWindow*);

  // Description:
  // Get the vtk render window.
  virtual vtkGenericOpenGLRenderWindow* GetRenderWindow();

  // Description:
  // Get the Qt/vtk interactor that was either created by default or set by the user
  virtual QVTKInteractor* GetInteractor();

  // Description:
  // Set the number of multisamples to use for antialiasing in this GLContext
  // Note: This will overwrite the MultiSamples of the internal vtkRenderWindow.
  // Warning: this->GetRenderWindow()->SetMultiSamples() will not have any effect, since
  // this is not synchronized with the vtkRenderWindow.
  virtual void SetMultiSamples(int multiSamples);

  // Description:
  // Get the number of multisamples used for antialiasing
  virtual int GetMultiSamples() const;

  // Description:
  // Use a 3DConnexion device. Initial value is false.
  // If VTK is not build with the TDx option, this is no-op.
  // If VTK is build with the TDx option, and a device is not connected,
  // a warning is emitted.
  // It is must be called before the first Render to be effective, otherwise
  // it is ignored.
  void SetUseTDx(bool useTDx);
  bool GetUseTDx() const;

  // Description:
  // Make the swap buffers functions public
  void setAutoBufferSwap(bool);
  bool autoBufferSwap() const;

public Q_SLOTS:

  // Description:
  // Receive notification of the creation of the TDxDevice.
  // Only relevant for Unix.
#ifdef VTK_USE_TDX
  void setDevice(vtkTDxDevice *device);
#endif

protected Q_SLOTS:
  // slot to make this vtk render window current
  virtual void MakeCurrent();
  // slot called when vtk wants to know if the context is current
  virtual void IsCurrent(vtkObject* caller, unsigned long vtk_event, void* client_data, void* call_data);
  // slot called when vtk wants to frame the window
  virtual void Frame();
  // slot called when vtk wants to start the render
  virtual void Start();
  // slot called when vtk wants to end the render
  virtual void End();
  // slot called when vtk wants to know if a window is direct
  virtual void IsDirect(vtkObject* caller, unsigned long vtk_event, void* client_data, void* call_data);
  // slot called when vtk wants to know if a window supports OpenGL
  virtual void SupportsOpenGL(vtkObject* caller, unsigned long vtk_event, void* client_data, void* call_data);

protected:
  // overloaded initialize handler
  virtual void initializeGL();
  // overloaded resize handler
  virtual void resizeGL(int, int);
  // overloaded paint handler
  virtual void paintGL();
  // overloaded move handler
  virtual void moveEvent(QMoveEvent* event);

  // overloaded touch events
  virtual bool event(QEvent* e);
  // overloaded mouse press handler
  virtual void mousePressEvent(QMouseEvent* event);
  // overloaded mouse move handler
  virtual void mouseMoveEvent(QMouseEvent* event);
  // overloaded mouse release handler
  virtual void mouseReleaseEvent(QMouseEvent* event);
  // overloaded key press handler
  virtual void keyPressEvent(QKeyEvent* event);
  // overloaded key release handler
  virtual void keyReleaseEvent(QKeyEvent* event);
  // overloaded enter event
  virtual void enterEvent(QEvent*);
  // overloaded leave event
  virtual void leaveEvent(QEvent*);
  // overload wheel mouse event
  virtual void wheelEvent(QWheelEvent*);

  // overload context menu event
  virtual void contextMenuEvent(QContextMenuEvent*);
  // overload drag enter event
  virtual void dragEnterEvent(QDragEnterEvent*);
  // overload drag move event
  virtual void dragMoveEvent(QDragMoveEvent*);
  // overload drag leave event
  virtual void dragLeaveEvent(QDragLeaveEvent*);
  // overload drop event
  virtual void dropEvent(QDropEvent*);

  // overload focus handling so tab key is passed to VTK
  virtual bool focusNextPrevChild(bool);

  // the vtk render window
  vtkSmartPointer<vtkGenericOpenGLRenderWindow> mRenWin;
  bool UseTDx;

  QVTKInteractorAdapter* mIrenAdapter;
  vtkSmartPointer<vtkEventQtSlotConnect> mConnect;

private:
  //! unimplemented operator=
  QVTKWidget2 const& operator=(QVTKWidget2 const&);
  //! unimplemented copy
  QVTKWidget2(const QVTKWidget2&);

};

#endif