Commit b3643e8f authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

use QVTKOpenGLNativeWidget

parent 3cec8909
......@@ -14,7 +14,7 @@
#include <QtGui>
#include <QVTKOpenGLWidget.h>
#include <QVTKOpenGLNativeWidget.h>
#include <vtkGenericOpenGLRenderWindow.h>
#include <dtkCore>
......@@ -36,7 +36,7 @@ int main(int argc, char **argv)
dtk::widgets::initialize();
dtkThemesEngine::instance()->apply();
QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat());
QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples(0);
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
......@@ -55,7 +55,7 @@ int main(int argc, char **argv)
dtkWidgetsLayoutItem::setActions(actions);
dtkVisualizationViewer *viewer = new dtkVisualizationViewer;
viewer->setWindowTitle("dtkVisualizationViewer");
application->setWindow(viewer);
application->initialize();
......
......@@ -20,7 +20,7 @@
#include <QtGui>
#include <QtWidgets>
#include <QVTKOpenGLWidget.h>
#include <QVTKOpenGLNativeWidget.h>
#include <vtkCamera.h>
#include <vtkGenericOpenGLRenderWindow.h>
......@@ -34,7 +34,7 @@
// dtkVisualizationCanvasPrivate
// ///////////////////////////////////////////////////////////////////
class dtkVisualizationCanvasPrivate : public QVTKOpenGLWidget
class dtkVisualizationCanvasPrivate : public QVTKOpenGLNativeWidget
{
Q_OBJECT
......@@ -72,9 +72,9 @@ public:
// ///////////////////////////////////////////////////////////////////
dtkVisualizationCanvasPrivate::dtkVisualizationCanvasPrivate(QWidget *parent) : QVTKOpenGLWidget(parent)
dtkVisualizationCanvasPrivate::dtkVisualizationCanvasPrivate(QWidget *parent) : QVTKOpenGLNativeWidget(parent)
{
this->setFormat(QVTKOpenGLWidget::defaultFormat());
this->setFormat(QVTKOpenGLNativeWidget::defaultFormat());
this->renderer = vtkSmartPointer<vtkRenderer>::New();
this->renderer->SetBackground(0.290, 0.295, 0.300);
......@@ -111,7 +111,7 @@ QSize dtkVisualizationCanvasPrivate::sizeHint(void) const
void dtkVisualizationCanvasPrivate::resizeEvent(QResizeEvent *event)
{
QVTKOpenGLWidget::resizeEvent(event);
QVTKOpenGLNativeWidget::resizeEvent(event);
this->hud->resize(event->size());
}
......@@ -120,7 +120,7 @@ void dtkVisualizationCanvasPrivate::mousePressEvent(QMouseEvent *event)
{
q->emit focused();
QVTKOpenGLWidget::mousePressEvent(event);
QVTKOpenGLNativeWidget::mousePressEvent(event);
}
void dtkVisualizationCanvasPrivate::onFocus(void)
......
......@@ -39,9 +39,6 @@
#include <vtkSmartPointer.h>
#include <vtkWindowToImageFilter.h>
#include <QVTKOpenGLWidget.h>
//needed to override the paintEvent and put state_sunken when checked
class buttonStayDown : public QPushButton
{
......
......@@ -26,13 +26,13 @@
#include <vtkRenderWindowInteractor.h>
#include <vtkSmartPointer.h>
#include <QVTKOpenGLWidget.h>
#include <QVTKOpenGLNativeWidget.h>
// ///////////////////////////////////////////////////////////////////
// dtkVisualizationPlot3DPrivate
// ///////////////////////////////////////////////////////////////////
class dtkVisualizationPlot3DPrivate : public QVTKOpenGLWidget
class dtkVisualizationPlot3DPrivate : public QVTKOpenGLNativeWidget
{
Q_OBJECT
......@@ -59,9 +59,9 @@ public:
dtkWidgetsOverlayPane *overlay;
};
dtkVisualizationPlot3DPrivate::dtkVisualizationPlot3DPrivate(QWidget *parent) : QVTKOpenGLWidget(parent)
dtkVisualizationPlot3DPrivate::dtkVisualizationPlot3DPrivate(QWidget *parent) : QVTKOpenGLNativeWidget(parent)
{
this->setFormat(QVTKOpenGLWidget::defaultFormat());
this->setFormat(QVTKOpenGLNativeWidget::defaultFormat());
this->renderer = vtkSmartPointer<vtkRenderer>::New();
this->renderer->SetBackground(0.290, 0.295, 0.300);
......@@ -90,12 +90,12 @@ void dtkVisualizationPlot3DPrivate::mousePressEvent(QMouseEvent *event)
{
q->emit focused();
QVTKOpenGLWidget::mousePressEvent(event);
QVTKOpenGLNativeWidget::mousePressEvent(event);
}
void dtkVisualizationPlot3DPrivate::resizeEvent(QResizeEvent *event)
{
QVTKOpenGLWidget::resizeEvent(event);
QVTKOpenGLNativeWidget::resizeEvent(event);
this->hud->resize(event->size());
......
......@@ -60,13 +60,13 @@
#include <vtkMetaImageReader.h>
#include <QVTKInteractor.h>
#include <QVTKOpenGLWidget.h>
#include <QVTKOpenGLNativeWidget.h>
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
class dtkVisualizationViewHybridPrivate : public QVTKOpenGLWidget
class dtkVisualizationViewHybridPrivate : public QVTKOpenGLNativeWidget
{
Q_OBJECT
......@@ -153,9 +153,9 @@ signals:
void sliceOrientationChanged(int);
};
dtkVisualizationViewHybridPrivate::dtkVisualizationViewHybridPrivate(QWidget *parent) : QVTKOpenGLWidget(parent)
dtkVisualizationViewHybridPrivate::dtkVisualizationViewHybridPrivate(QWidget *parent) : QVTKOpenGLNativeWidget(parent)
{
this->setFormat(QVTKOpenGLWidget::defaultFormat());
this->setFormat(QVTKOpenGLNativeWidget::defaultFormat());
this->renderer2D = vtkSmartPointer<vtkRenderer>::New();
this->renderer2D->SetBackground(0.290, 0.295, 0.300);
......@@ -256,7 +256,7 @@ void dtkVisualizationViewHybridPrivate::resizeEvent(QResizeEvent *event)
this->sync->move(event->size().width() - 50, 10);
QVTKOpenGLWidget::resizeEvent(event);
QVTKOpenGLNativeWidget::resizeEvent(event);
}
dtkVisualizationViewHybridPrivate::Orientation dtkVisualizationViewHybridPrivate::orientation(void)
......
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