Commit ee8d79a1 authored by Jean-Christophe Fillion-Robin's avatar Jean-Christophe Fillion-Robin

Rename QVTKOpenGLSimpleWidget to QVTKOpenGLNativeWidget

parent 62742bfe
......@@ -10,7 +10,7 @@
#include <QApplication>
#include <QSurfaceFormat>
#include "QVTKOpenGLSimpleWidget.h"
#include "QVTKOpenGLNativeWidget.h"
#include "CustomLinkView.h"
extern int qInitResources_icons();
......@@ -18,7 +18,7 @@ extern int qInitResources_icons();
int main( int argc, char** argv )
{
// needed to ensure appropriate OpenGL context is created for VTK rendering.
QSurfaceFormat::setDefaultFormat(QVTKOpenGLSimpleWidget::defaultFormat());
QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
// QT Stuff
QApplication app( argc, argv );
......
......@@ -14,7 +14,7 @@ set(QVTKLibSrcs
vtkQtDebugLeaksView.cxx
vtkQtTableModelAdapter.cxx
vtkQtTreeModelAdapter.cxx
QVTKOpenGLSimpleWidget.cxx
QVTKOpenGLNativeWidget.cxx
QVTKOpenGLWidget.cxx
QVTKOpenGLWindow.cxx
)
......@@ -31,7 +31,7 @@ set(QVTKMocHeaders
vtkQtDebugLeaksView.h
vtkQtTableModelAdapter.h
vtkQtTreeModelAdapter.h
QVTKOpenGLSimpleWidget.h
QVTKOpenGLNativeWidget.h
QVTKOpenGLWidget.h
QVTKOpenGLWindow.h
)
......
......@@ -50,10 +50,10 @@ class QVTKInteractorInternal;
/**
* @class QVTKInteractor
* @brief - an interactor for QVTKOpenGLSimpleWidget (and QVTKWiget).
* @brief - an interactor for QVTKOpenGLNativeWidget (and QVTKWiget).
*
* QVTKInteractor handles relaying Qt events to VTK.
* @sa QVTKOpenGLSimpleWidget
* @sa QVTKOpenGLNativeWidget
*/
class VTKGUISUPPORTQT_EXPORT QVTKInteractor : public vtkRenderWindowInteractor
......
/*=========================================================================
Program: Visualization Toolkit
Module: QVTKOpenGLSimpleWidget.h
Module: QVTKOpenGLNativeWidget.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -13,38 +13,38 @@
=========================================================================*/
/**
* @class QVTKOpenGLSimpleWidget
* @class QVTKOpenGLNativeWidget
* @brief QOpenGLWidget subclass to house a vtkGenericOpenGLRenderWindow in a Qt
* application.
*
* QVTKOpenGLSimpleWidget extends QOpenGLWidget to make it work with a
* QVTKOpenGLNativeWidget extends QOpenGLWidget to make it work with a
* vtkGenericOpenGLRenderWindow. This is akin to QVTKWidget except it uses Qt to create and
* manage the OpenGL context using QOpenGLWidget (added in Qt 5.4).
*
* While QVTKOpenGLSimpleWidget is intended to be a replacement for QVTKWidget when
* using Qt 5, there are a few difference between QVTKOpenGLSimpleWidget and
* While QVTKOpenGLNativeWidget is intended to be a replacement for QVTKWidget when
* using Qt 5, there are a few difference between QVTKOpenGLNativeWidget and
* QVTKWidget.
*
* Unlike QVTKWidget, QVTKOpenGLSimpleWidget only works with vtkGenericOpenGLRenderWindow.
* Unlike QVTKWidget, QVTKOpenGLNativeWidget only works with vtkGenericOpenGLRenderWindow.
* This is necessary since QOpenGLWidget wants to take over the window management as
* well as the OpenGL context creation. Getting that to work reliably with
* vtkXRenderWindow or vtkWin32RenderWindow (and other platform specific
* vtkRenderWindow subclasses) was tricky and fraught with issues.
*
* Since QVTKOpenGLSimpleWidget uses QOpenGLWidget to create the OpenGL context,
* Since QVTKOpenGLNativeWidget uses QOpenGLWidget to create the OpenGL context,
* it uses QSurfaceFormat (set using `QOpenGLWidget::setFormat` or
* `QSurfaceFormat::setDefaultFormat`) to create appropriate window and context.
* You can use `QVTKOpenGLSimpleWidget::copyToFormat` to obtain a QSurfaceFormat
* You can use `QVTKOpenGLNativeWidget::copyToFormat` to obtain a QSurfaceFormat
* appropriate for a vtkRenderWindow.
*
* A typical usage for QVTKOpenGLSimpleWidget is as follows:
* A typical usage for QVTKOpenGLNativeWidget is as follows:
* @code{.cpp}
*
* // before initializing QApplication, set the default surface format.
* QSurfaceFormat::setDefaultFormat(QVTKOpenGLSimpleWidget::defaultFormat());
* QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
*
* vtkNew<vtkGenericOpenGLRenderWindow> window;
* QPointer<QVTKOpenGLSimpleWidget> widget = new QVTKOpenGLSimpleWidget(...);
* QPointer<QVTKOpenGLNativeWidget> widget = new QVTKOpenGLNativeWidget(...);
* widget->SetRenderWindow(window.Get());
*
* // If using any of the standard view e.g. vtkContextView, then
......@@ -59,11 +59,11 @@
*
* @section OpenGLContext OpenGL Context
*
* In QOpenGLWidget (superclass for QVTKOpenGLSimpleWidget), all rendering happens in a
* In QOpenGLWidget (superclass for QVTKOpenGLNativeWidget), all rendering happens in a
* framebuffer object. Thus, care must be taken in the rendering code to never
* directly re-bind the default framebuffer i.e. ID 0.
*
* QVTKOpenGLSimpleWidget creates an internal QOpenGLFramebufferObject, independent of the
* QVTKOpenGLNativeWidget creates an internal QOpenGLFramebufferObject, independent of the
* one created by superclass, for vtkRenderWindow to do the rendering in. This
* explicit double-buffering is useful in avoiding temporary back-buffer only
* renders done in VTK (e.g. when making selections) from destroying the results
......@@ -71,7 +71,7 @@
*
* @section RenderAndPaint Handling Render and Paint.
*
* QWidget subclasses (including `QOpenGLWidget` and `QVTKOpenGLSimpleWidget`) display
* QWidget subclasses (including `QOpenGLWidget` and `QVTKOpenGLNativeWidget`) display
* their contents on the screen in `QWidget::paint` in response to a paint event.
* `QOpenGLWidget` subclasses are expected to do OpenGL rendering in
* `QOpenGLWidget::paintGL`. QWidget can receive paint events for various
......@@ -86,26 +86,26 @@
*
* Since paint in Qt can be called more often then needed, we avoid potentially
* expensive `vtkRenderWindow::Render` calls each time that happens. Instead,
* QVTKOpenGLSimpleWidget relies on the VTK application calling
* QVTKOpenGLNativeWidget relies on the VTK application calling
* `vtkRenderWindow::Render` on the render window when it needs to update the
* rendering. `paintGL` simply passes on the result rendered by the most render
* vtkRenderWindow::Render to Qt windowing system for composing on-screen.
*
* There may still be occasions when we may have to render in `paint` for
* example if the window was resized or Qt had to recreate the OpenGL context.
* In those cases, `QVTKOpenGLSimpleWidget::paintGL` can request a render by calling
* `QVTKOpenGLSimpleWidget::renderVTK`.
* In those cases, `QVTKOpenGLNativeWidget::paintGL` can request a render by calling
* `QVTKOpenGLNativeWidget::renderVTK`.
*
* @section Caveats
* QVTKOpenGLSimpleWidget only supports **OpenGL2** rendering backend.
* QVTKOpenGLSimpleWidget does not support stereo,
* QVTKOpenGLNativeWidget only supports **OpenGL2** rendering backend.
* QVTKOpenGLNativeWidget does not support stereo,
* please use QVTKOpenGLWidget if you need support for stereo rendering
*
* QVTKOpenGLSimpleWidget is targeted for Qt version 5.5 and above.
* QVTKOpenGLNativeWidget is targeted for Qt version 5.5 and above.
*
*/
#ifndef QVTKOpenGLSimpleWidget_h
#define QVTKOpenGLSimpleWidget_h
#ifndef QVTKOpenGLNativeWidget_h
#define QVTKOpenGLNativeWidget_h
#include <QOpenGLWidget>
......@@ -118,16 +118,16 @@ class QOpenGLDebugLogger;
class QOpenGLFramebufferObject;
class QVTKInteractor;
class QVTKInteractorAdapter;
class QVTKOpenGLSimpleWidgetObserver;
class QVTKOpenGLNativeWidgetObserver;
class vtkGenericOpenGLRenderWindow;
class VTKGUISUPPORTQT_EXPORT QVTKOpenGLSimpleWidget : public QOpenGLWidget
class VTKGUISUPPORTQT_EXPORT QVTKOpenGLNativeWidget : public QOpenGLWidget
{
Q_OBJECT
typedef QOpenGLWidget Superclass;
public:
QVTKOpenGLSimpleWidget(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
~QVTKOpenGLSimpleWidget() override;
QVTKOpenGLNativeWidget(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
~QVTKOpenGLNativeWidget() override;
//@{
/**
......@@ -162,7 +162,7 @@ public:
/**
* Returns a typical QSurfaceFormat suitable for most applications using
* QVTKOpenGLSimpleWidget. Note that this is not the QSurfaceFormat that gets used
* QVTKOpenGLNativeWidget. Note that this is not the QSurfaceFormat that gets used
* if none is specified. That is set using `QSurfaceFormat::setDefaultFormat`.
*/
static QSurfaceFormat defaultFormat();
......@@ -217,7 +217,7 @@ protected:
/**
* This method is called to indicate that vtkRenderWindow needs to reinitialize
* itself before the next render (done in QVTKOpenGLSimpleWidget::paintGL).
* itself before the next render (done in QVTKOpenGLNativeWidget::paintGL).
* This is needed when the context gets recreated
* or the default FrameBufferObject gets recreated, for example.
*/
......@@ -232,8 +232,8 @@ protected:
* rendering.
*
* Default implementation never returns false. However, subclasses can return
* false to indicate to QVTKOpenGLSimpleWidget that it cannot generate a reasonable
* image to be displayed in QVTKOpenGLSimpleWidget. In which case, the `paintGL`
* false to indicate to QVTKOpenGLNativeWidget that it cannot generate a reasonable
* image to be displayed in QVTKOpenGLNativeWidget. In which case, the `paintGL`
* call will return leaving the `defaultFramebufferObject` untouched.
*
* Since by default `QOpenGLWidget::UpdateBehavior` is set to
......@@ -253,7 +253,7 @@ protected:
int OriginalDPI;
private:
Q_DISABLE_COPY(QVTKOpenGLSimpleWidget);
Q_DISABLE_COPY(QVTKOpenGLNativeWidget);
/**
* Called when vtkCommand::WindowFrameEvent is fired by the
......@@ -264,8 +264,8 @@ private:
QOpenGLFramebufferObject* FBO;
bool InPaintGL;
bool DoVTKRenderInPaintGL;
vtkNew<QVTKOpenGLSimpleWidgetObserver> Observer;
friend class QVTKOpenGLSimpleWidgetObserver;
vtkNew<QVTKOpenGLNativeWidgetObserver> Observer;
friend class QVTKOpenGLNativeWidgetObserver;
QOpenGLDebugLogger* Logger;
};
......
......@@ -69,11 +69,11 @@ class vtkRenderWindowInteractor;
* but it is mainly tested on Qt 5.9 and above.
*
* QVTKOpenGLWidget does not support to be a native widget,
* for native widget, please use QVTKOpenGLSimpleWidget.
* for native widget, please use QVTKOpenGLNativeWidget.
* Beware, uses of this widget in a QScrollArea or in
* a QMDIArea will force it to be native, which is unsupported.
*
* @sa QVTKOpenGLWindow QVTKOpenGLSimpleWidget
* @sa QVTKOpenGLWindow QVTKOpenGLNativeWidget
*/
class VTKGUISUPPORTQT_EXPORT QVTKOpenGLWidget : public QWidget
{
......
......@@ -34,12 +34,12 @@ class vtkRenderWindow;
* QVTKOpenGLWindow provides a way to display VTK data in a Qt OpenGL context.
*
* QVTKOpenGLWindow extends QOpenGLWindow to make it work with a
* vtkGenericOpenGLRenderWindow. This is akin to QVTKOpenGLSimpleWidget except the
* vtkGenericOpenGLRenderWindow. This is akin to QVTKOpenGLNativeWidget except the
* OpenGL context is created and managed by QOpenGLWindow (added in Qt 5.4).
*
* While QVTKOpenGLWindow is intended to be a replacement for
* QVTKOpenGLSimpleWidget, there are a few difference between both.
* Unlike QVTKOpenGLSimpleWidget, QVTKOpenGLWindow can target multiple framebuffers
* QVTKOpenGLNativeWidget, there are a few difference between both.
* Unlike QVTKOpenGLNativeWidget, QVTKOpenGLWindow can target multiple framebuffers
* and thus allows for stereo-capable applications.
* QVTKOpenGLWindow API was adapted from deprecated QVTKWidget2.
*
......@@ -73,7 +73,7 @@ class vtkRenderWindow;
*
* QVTKOpenGLWindow is targeted for Qt version 5.9 and above.
*
* @sa QVTKOpenGLWidget QVTKOpenGLSimpleWidget QVTKWidget2
* @sa QVTKOpenGLWidget QVTKOpenGLNativeWidget QVTKWidget2
*/
class VTKGUISUPPORTQT_EXPORT QVTKOpenGLWindow : public QOpenGLWindow
{
......
......@@ -29,7 +29,7 @@
* @brief - display a vtkRenderWindow in a Qt's QWidget.
*
* QVTKWidget provides a way to display VTK data in a Qt widget.
* @deprecated Please use QVTKOpenGLSimpleWidget instead.
* @deprecated Please use QVTKOpenGLNativeWidget instead.
*/
#ifndef Q_VTK_WIDGET_H
......
......@@ -5,17 +5,17 @@ vtk_add_test_cxx(vtkGUISupportQtCxxTests tests
TestQtDebugLeaksView.cxx
TestQtTableModelAdapter.cxx
TestQtTreeModelAdapter.cxx
TestQVTKOpenGLSimpleWidgetPicking.cxx
TestQVTKOpenGLNativeWidgetPicking.cxx
TestQVTKOpenGLWidgetPicking.cxx
TestQVTKOpenGLSimpleWidgetSwapWindows.cxx
TestQVTKOpenGLNativeWidgetSwapWindows.cxx
TestQVTKOpenGLWidgetSwapWindows.cxx
)
vtk_add_test_cxx(vtkGUISupportQtCxxTests tests
TestQVTKOpenGLSimpleWidget.cxx
TestQVTKOpenGLNativeWidget.cxx
TestQVTKOpenGLWidget.cxx
TestQVTKOpenGLSimpleWidgetWithDisabledInteractor.cxx
TestQVTKOpenGLSimpleWidgetWithMSAA.cxx
TestQVTKOpenGLNativeWidgetWithDisabledInteractor.cxx
TestQVTKOpenGLNativeWidgetWithMSAA.cxx
TestQVTKOpenGLWidgetWithMSAA.cxx
)
......
/*=========================================================================
Program: Visualization Toolkit
Module: TestQVTKOpenGLSimpleWidget.cxx
Module: TestQVTKOpenGLNativeWidget.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,9 +12,9 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// Tests QVTKOpenGLSimpleWidget
// Tests QVTKOpenGLNativeWidget
#include "QVTKOpenGLSimpleWidget.h"
#include "QVTKOpenGLNativeWidget.h"
#include "vtkActor.h"
#include "vtkGenericOpenGLRenderWindow.h"
#include "vtkNew.h"
......@@ -26,18 +26,18 @@
#include <QApplication>
#include <QSurfaceFormat>
int TestQVTKOpenGLSimpleWidget(int argc, char* argv[])
int TestQVTKOpenGLNativeWidget(int argc, char* argv[])
{
// disable multisampling.
vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples(0);
QSurfaceFormat::setDefaultFormat(QVTKOpenGLSimpleWidget::defaultFormat());
QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
QApplication app(argc, argv);
vtkNew<vtkTesting> vtktesting;
vtktesting->AddArguments(argc, argv);
QVTKOpenGLSimpleWidget widget;
QVTKOpenGLNativeWidget widget;
{
vtkNew<vtkGenericOpenGLRenderWindow> window0;
......
/*=========================================================================
Program: Visualization Toolkit
Module: TestQVTKOpenGLSimpleWidgetPicking.cxx
Module: TestQVTKOpenGLNativeWidgetPicking.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,9 +12,9 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// Tests picking actors with QVTKOpenGLSimpleWidget and vtkPropPicker.
// Tests picking actors with QVTKOpenGLNativeWidget and vtkPropPicker.
#include "QVTKOpenGLSimpleWidget.h"
#include "QVTKOpenGLNativeWidget.h"
#include "vtkActor2D.h"
#include "vtkCamera.h"
#include "vtkCoordinate.h"
......@@ -33,15 +33,15 @@
#include <cmath>
#include <vector>
int TestQVTKOpenGLSimpleWidgetPicking(int argc, char* argv[])
int TestQVTKOpenGLNativeWidgetPicking(int argc, char* argv[])
{
// Disable multisampling
vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples(0);
QSurfaceFormat::setDefaultFormat(QVTKOpenGLSimpleWidget::defaultFormat());
QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
QApplication app(argc, argv);
QVTKOpenGLSimpleWidget widget;
QVTKOpenGLNativeWidget widget;
widget.resize(300, 300);
auto renWin = vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();
......
#include <QVTKOpenGLSimpleWidget.h>
#include <QVTKOpenGLNativeWidget.h>
#include <vtkNew.h>
#include <vtkRenderWindow.h>
#include <vtkRenderer.h>
......@@ -9,19 +9,19 @@
#include <QSurfaceFormat>
#include <QWidget>
int TestQVTKOpenGLSimpleWidgetSwapWindows(int argc, char* argv[])
int TestQVTKOpenGLNativeWidgetSwapWindows(int argc, char* argv[])
{
QSurfaceFormat::setDefaultFormat(QVTKOpenGLSimpleWidget::defaultFormat());
QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
QApplication app(argc, argv);
// Set up frame with two horizontally stacked panels,
// Each containing a QVTKOpenGLSimpleWidget
// Each containing a QVTKOpenGLNativeWidget
QWidget frame;
QHBoxLayout *layout = new QHBoxLayout(&frame);
QWidget *leftPanel = new QWidget(&frame);
QVBoxLayout *leftLayout = new QVBoxLayout(leftPanel);
QVTKOpenGLSimpleWidget* leftVTKWidget = new QVTKOpenGLSimpleWidget(leftPanel);
QVTKOpenGLNativeWidget* leftVTKWidget = new QVTKOpenGLNativeWidget(leftPanel);
vtkSmartPointer<vtkRenderer> leftRenderer = vtkSmartPointer<vtkRenderer>::New();
leftRenderer->SetBackground(1, 0, 0);
leftVTKWidget->GetRenderWindow()->AddRenderer(leftRenderer);
......@@ -29,7 +29,7 @@ int TestQVTKOpenGLSimpleWidgetSwapWindows(int argc, char* argv[])
QWidget *rightPanel = new QWidget(&frame);
QVBoxLayout *rightLayout = new QVBoxLayout(rightPanel);
QVTKOpenGLSimpleWidget* rightVTKWidget = new QVTKOpenGLSimpleWidget(rightPanel);
QVTKOpenGLNativeWidget* rightVTKWidget = new QVTKOpenGLNativeWidget(rightPanel);
vtkSmartPointer<vtkRenderer> rightRenderer = vtkSmartPointer<vtkRenderer>::New();
rightRenderer->SetBackground(0, 1, 0);
rightVTKWidget->GetRenderWindow()->AddRenderer(rightRenderer);
......@@ -44,7 +44,7 @@ int TestQVTKOpenGLSimpleWidgetSwapWindows(int argc, char* argv[])
rightVTKWidget->GetRenderWindow()->Render();
app.processEvents();
// Swap QVTKOpenGLSimpleWidget
// Swap QVTKOpenGLNativeWidget
rightLayout->removeWidget(rightVTKWidget);
leftLayout->removeWidget(leftVTKWidget);
rightVTKWidget->setParent(leftPanel);
......
/*=========================================================================
Program: Visualization Toolkit
Module: TestQVTKOpenGLSimpleWidgetWithDisabledInteractor.cxx
Module: TestQVTKOpenGLNativeWidgetWithDisabledInteractor.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,10 +12,10 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// Tests QVTKOpenGLSimpleWidget with a vtkRenderWindowInteractor that has its
// Tests QVTKOpenGLNativeWidget with a vtkRenderWindowInteractor that has its
// EnableRender flag disabled.
#include "QVTKOpenGLSimpleWidget.h"
#include "QVTKOpenGLNativeWidget.h"
#include "vtkActor.h"
#include "vtkGenericOpenGLRenderWindow.h"
#include "vtkPolyDataMapper.h"
......@@ -40,18 +40,18 @@ void WaitQtEventLoop(int msec)
loop.exec();
}
int TestQVTKOpenGLSimpleWidgetWithDisabledInteractor(int argc, char* argv[])
int TestQVTKOpenGLNativeWidgetWithDisabledInteractor(int argc, char* argv[])
{
// Disable multisampling
vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples(0);
QSurfaceFormat::setDefaultFormat(QVTKOpenGLSimpleWidget::defaultFormat());
QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
QApplication app(argc, argv);
auto vtktesting = vtkSmartPointer<vtkTesting>::New();
vtktesting->AddArguments(argc, argv);
QVTKOpenGLSimpleWidget widget;
QVTKOpenGLNativeWidget widget;
widget.resize(100, 100);
auto renWin = vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();
......
/*=========================================================================
Program: Visualization Toolkit
Module: TestQVTKOpenGLSimpleWidgetWithMSAA.cxx
Module: TestQVTKOpenGLNativeWidgetWithMSAA.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,8 +12,8 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// Tests QVTKOpenGLSimpleWidget with MSAA (based on TestQVTKOpenGLSimpleWidget)
#include "QVTKOpenGLSimpleWidget.h"
// Tests QVTKOpenGLNativeWidget with MSAA (based on TestQVTKOpenGLNativeWidget)
#include "QVTKOpenGLNativeWidget.h"
#include "vtkActor.h"
#include "vtkGenericOpenGLRenderWindow.h"
#include "vtkNew.h"
......@@ -25,11 +25,11 @@
#include <QApplication>
#include <QSurfaceFormat>
int TestQVTKOpenGLSimpleWidgetWithMSAA(int argc, char* argv[])
int TestQVTKOpenGLNativeWidgetWithMSAA(int argc, char* argv[])
{
// enable multisampling.
vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples(8);
QSurfaceFormat::setDefaultFormat(QVTKOpenGLSimpleWidget::defaultFormat());
QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
QApplication app(argc, argv);
......@@ -38,7 +38,7 @@ int TestQVTKOpenGLSimpleWidgetWithMSAA(int argc, char* argv[])
vtkNew<vtkGenericOpenGLRenderWindow> window;
QVTKOpenGLSimpleWidget widget;
QVTKOpenGLNativeWidget widget;
widget.SetRenderWindow(window);
vtkNew<vtkRenderer> ren;
......
/*=========================================================================
Program: Visualization Toolkit
Module: TestQVTKOpenGLSimpleWidget.cxx
Module: TestQVTKOpenGLWidget.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......
/*=========================================================================
Program: Visualization Toolkit
Module: TestQVTKOpenGLSimpleWidgetPicking.cxx
Module: TestQVTKOpenGLWidgetPicking.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,7 +12,7 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// Tests picking actors with QVTKOpenGLSimpleWidget and vtkPropPicker.
// Tests picking actors with QVTKOpenGLWidget and vtkPropPicker.
#include "QVTKOpenGLWidget.h"
#include "vtkActor2D.h"
......
......@@ -20,7 +20,7 @@
* vtkTDXUnixDevice. It is uses internally by QVTKApplication.
*
* @sa
* vtkTDxUnixDevice QVTKOpenGLSimpleWidget QVTKApplication
* vtkTDxUnixDevice QVTKOpenGLNativeWidget QVTKApplication
*/
#ifndef vtkTDxQtUnixDevices_h
......@@ -51,7 +51,7 @@ signals:
/**
* This signal should be connected to a slot in the QApplication.
* The slot in the QApplication is supposed to remit this signal.
* The QVTKOpenGLSimpleWidget have slot to receive this signal from the QApplication.
* The QVTKOpenGLNativeWidget have slot to receive this signal from the QApplication.
*/
void CreateDevice(vtkTDxDevice *device);
......
......@@ -43,9 +43,9 @@ class vtkTDxDevice;
*
* QVTKWidget2 provides a way to display VTK data in a Qt QGLWidget. Since
* QGLWidget is flagged as obsolete by Qt, it is recommended to use
* QVTKOpenGLSimpleWidget instead.
* QVTKOpenGLNativeWidget instead.
*
* @deprecated Please use QVTKOpenGLSimpleWidget instead.
* @deprecated Please use QVTKOpenGLNativeWidget instead.
*/
class VTKGUISUPPORTQTOPENGL_EXPORT QVTKWidget2 : public QGLWidget
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment