Commit 767c79fa authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

Merge branch 'feature/vtk-native' into 'develop'

Feature/vtk native

See merge request !40
parents 93824b53 8d73758e
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <QtGui> #include <QtGui>
#include <QVTKOpenGLWidget.h> #include <QVTKOpenGLNativeWidget.h>
#include <vtkGenericOpenGLRenderWindow.h> #include <vtkGenericOpenGLRenderWindow.h>
#include <dtkCore> #include <dtkCore>
...@@ -36,7 +36,7 @@ int main(int argc, char **argv) ...@@ -36,7 +36,7 @@ int main(int argc, char **argv)
dtk::widgets::initialize(); dtk::widgets::initialize();
dtkThemesEngine::instance()->apply(); dtkThemesEngine::instance()->apply();
QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples(0); vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples(0);
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
...@@ -55,7 +55,7 @@ int main(int argc, char **argv) ...@@ -55,7 +55,7 @@ int main(int argc, char **argv)
dtkWidgetsLayoutItem::setActions(actions); dtkWidgetsLayoutItem::setActions(actions);
dtkVisualizationViewer *viewer = new dtkVisualizationViewer; dtkVisualizationViewer *viewer = new dtkVisualizationViewer;
viewer->setWindowTitle("dtkVisualizationViewer");
application->setWindow(viewer); application->setWindow(viewer);
application->initialize(); application->initialize();
......
...@@ -16,7 +16,7 @@ channels: ...@@ -16,7 +16,7 @@ channels:
- dtk - dtk
dependencies: dependencies:
- qt >=5.9.0 - qt >=5.9.0
- vtk=8.1.2 - vtk=8.2.0
- dtk-widgets >=2.12.0, <2.17 - dtk-widgets >=2.12.0, <2.17
- gst-plugins-good - gst-plugins-good
- gst-libav - gst-libav
......
...@@ -17,7 +17,7 @@ channels: ...@@ -17,7 +17,7 @@ channels:
- dtk - dtk
dependencies: dependencies:
- qt >=5.9.0 - qt >=5.9.0
- vtk=8.1.2 - vtk=8.2.0
- dtk-widgets >=2.11.2 - dtk-widgets >=2.11.2
# #
......
...@@ -2,9 +2,14 @@ ...@@ -2,9 +2,14 @@
mkdir build mkdir build
cd build cd build
if [[ "$c_compiler" == "gcc" ]]; then
export PATH="${PATH}:${BUILD_PREFIX}/${HOST}/sysroot/usr/lib:${BUILD_PREFIX}/${HOST}/sysroot/usr/include"
fi
cmake .. \ cmake .. \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DDTKVISUALIZATION_USE_UPCOMING_VTK=OFF \
-DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_LIBDIR=lib
make -j${CPU_COUNT} make -j${CPU_COUNT}
......
...@@ -44,10 +44,10 @@ requirements: ...@@ -44,10 +44,10 @@ requirements:
- qt >=5.9.0 - qt >=5.9.0
- dtk-widgets >=2.12.0 - dtk-widgets >=2.12.0
- dtk-themes >=2.1.0,<2.2 - dtk-themes >=2.1.0,<2.2
- vtk >=8.1.2,<8.2.0 - vtk >=8.2.0
run: run:
- vtk >=8.1.2,<8.2.0 - vtk >=8.2.0
- qt >=5.9.0 - qt >=5.9.0
- dtk-widgets >=2.12.0 - dtk-widgets >=2.12.0
- dtk-themes >=2.1.0,<2.2 - dtk-themes >=2.1.0,<2.2
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <QtGui> #include <QtGui>
#include <QtWidgets> #include <QtWidgets>
#include <QVTKOpenGLWidget.h> #include <QVTKOpenGLNativeWidget.h>
#include <vtkCamera.h> #include <vtkCamera.h>
#include <vtkGenericOpenGLRenderWindow.h> #include <vtkGenericOpenGLRenderWindow.h>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
// dtkVisualizationCanvasPrivate // dtkVisualizationCanvasPrivate
// /////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////
class dtkVisualizationCanvasPrivate : public QVTKOpenGLWidget class dtkVisualizationCanvasPrivate : public QVTKOpenGLNativeWidget
{ {
Q_OBJECT Q_OBJECT
...@@ -72,9 +72,9 @@ public: ...@@ -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 = vtkSmartPointer<vtkRenderer>::New();
this->renderer->SetBackground(0.290, 0.295, 0.300); this->renderer->SetBackground(0.290, 0.295, 0.300);
...@@ -111,7 +111,7 @@ QSize dtkVisualizationCanvasPrivate::sizeHint(void) const ...@@ -111,7 +111,7 @@ QSize dtkVisualizationCanvasPrivate::sizeHint(void) const
void dtkVisualizationCanvasPrivate::resizeEvent(QResizeEvent *event) void dtkVisualizationCanvasPrivate::resizeEvent(QResizeEvent *event)
{ {
QVTKOpenGLWidget::resizeEvent(event); QVTKOpenGLNativeWidget::resizeEvent(event);
this->hud->resize(event->size()); this->hud->resize(event->size());
} }
...@@ -120,7 +120,7 @@ void dtkVisualizationCanvasPrivate::mousePressEvent(QMouseEvent *event) ...@@ -120,7 +120,7 @@ void dtkVisualizationCanvasPrivate::mousePressEvent(QMouseEvent *event)
{ {
q->emit focused(); q->emit focused();
QVTKOpenGLWidget::mousePressEvent(event); QVTKOpenGLNativeWidget::mousePressEvent(event);
} }
void dtkVisualizationCanvasPrivate::onFocus(void) void dtkVisualizationCanvasPrivate::onFocus(void)
......
...@@ -39,9 +39,6 @@ ...@@ -39,9 +39,6 @@
#include <vtkSmartPointer.h> #include <vtkSmartPointer.h>
#include <vtkWindowToImageFilter.h> #include <vtkWindowToImageFilter.h>
#include <QVTKOpenGLWidget.h>
//needed to override the paintEvent and put state_sunken when checked //needed to override the paintEvent and put state_sunken when checked
class buttonStayDown : public QPushButton class buttonStayDown : public QPushButton
{ {
......
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
#include <vtkRenderWindowInteractor.h> #include <vtkRenderWindowInteractor.h>
#include <vtkSmartPointer.h> #include <vtkSmartPointer.h>
#include <QVTKOpenGLWidget.h> #include <QVTKOpenGLNativeWidget.h>
// /////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////
// dtkVisualizationPlot3DPrivate // dtkVisualizationPlot3DPrivate
// /////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////
class dtkVisualizationPlot3DPrivate : public QVTKOpenGLWidget class dtkVisualizationPlot3DPrivate : public QVTKOpenGLNativeWidget
{ {
Q_OBJECT Q_OBJECT
...@@ -59,9 +59,9 @@ public: ...@@ -59,9 +59,9 @@ public:
dtkWidgetsOverlayPane *overlay; 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 = vtkSmartPointer<vtkRenderer>::New();
this->renderer->SetBackground(0.290, 0.295, 0.300); this->renderer->SetBackground(0.290, 0.295, 0.300);
...@@ -90,12 +90,12 @@ void dtkVisualizationPlot3DPrivate::mousePressEvent(QMouseEvent *event) ...@@ -90,12 +90,12 @@ void dtkVisualizationPlot3DPrivate::mousePressEvent(QMouseEvent *event)
{ {
q->emit focused(); q->emit focused();
QVTKOpenGLWidget::mousePressEvent(event); QVTKOpenGLNativeWidget::mousePressEvent(event);
} }
void dtkVisualizationPlot3DPrivate::resizeEvent(QResizeEvent *event) void dtkVisualizationPlot3DPrivate::resizeEvent(QResizeEvent *event)
{ {
QVTKOpenGLWidget::resizeEvent(event); QVTKOpenGLNativeWidget::resizeEvent(event);
this->hud->resize(event->size()); this->hud->resize(event->size());
......
...@@ -60,13 +60,13 @@ ...@@ -60,13 +60,13 @@
#include <vtkMetaImageReader.h> #include <vtkMetaImageReader.h>
#include <QVTKInteractor.h> #include <QVTKInteractor.h>
#include <QVTKOpenGLWidget.h> #include <QVTKOpenGLNativeWidget.h>
// /////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////
// //
// /////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////
class dtkVisualizationViewHybridPrivate : public QVTKOpenGLWidget class dtkVisualizationViewHybridPrivate : public QVTKOpenGLNativeWidget
{ {
Q_OBJECT Q_OBJECT
...@@ -153,9 +153,9 @@ signals: ...@@ -153,9 +153,9 @@ signals:
void sliceOrientationChanged(int); 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 = vtkSmartPointer<vtkRenderer>::New();
this->renderer2D->SetBackground(0.290, 0.295, 0.300); this->renderer2D->SetBackground(0.290, 0.295, 0.300);
...@@ -256,7 +256,7 @@ void dtkVisualizationViewHybridPrivate::resizeEvent(QResizeEvent *event) ...@@ -256,7 +256,7 @@ void dtkVisualizationViewHybridPrivate::resizeEvent(QResizeEvent *event)
this->sync->move(event->size().width() - 50, 10); this->sync->move(event->size().width() - 50, 10);
QVTKOpenGLWidget::resizeEvent(event); QVTKOpenGLNativeWidget::resizeEvent(event);
} }
dtkVisualizationViewHybridPrivate::Orientation dtkVisualizationViewHybridPrivate::orientation(void) 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