diff --git a/noether_gui/include/noether_gui/widgets/tpp_widget.h b/noether_gui/include/noether_gui/widgets/tpp_widget.h index 613a91ab..ad4252d8 100644 --- a/noether_gui/include/noether_gui/widgets/tpp_widget.h +++ b/noether_gui/include/noether_gui/widgets/tpp_widget.h @@ -4,7 +4,14 @@ #include #include +#if VTK_MAJOR_VERSION > 7 +class QVTKOpenGLNativeWidget; +using RenderWidget = QVTKOpenGLNativeWidget; +#else class QVTKWidget; +using RenderWidget = QVTKWidget; +#endif + class vtkActor; class vtkPolyDataMapper; class vtkProp; @@ -63,7 +70,7 @@ class TPPWidget : public QWidget TPPPipelineWidget* pipeline_widget_; // Viewer rendering - QVTKWidget* render_widget_; + RenderWidget* render_widget_; vtkSmartPointer renderer_; vtkSmartPointer mesh_mapper_; vtkSmartPointer mesh_actor_; diff --git a/noether_gui/src/widgets/tpp_widget.cpp b/noether_gui/src/widgets/tpp_widget.cpp index c2b12386..4dfd3739 100644 --- a/noether_gui/src/widgets/tpp_widget.cpp +++ b/noether_gui/src/widgets/tpp_widget.cpp @@ -13,7 +13,11 @@ #include // Rendering includes +#if VTK_MAJOR_VERSION > 7 +#include +#else #include +#endif #include #include #include @@ -35,7 +39,7 @@ TPPWidget::TPPWidget(boost_plugin_loader::PluginLoader loader, QWidget* parent) : QWidget(parent) , ui_(new Ui::TPP()) , pipeline_widget_(new TPPPipelineWidget(std::move(loader), this)) - , render_widget_(new QVTKWidget(this)) + , render_widget_(new RenderWidget(this)) , renderer_(vtkSmartPointer::New()) , mesh_mapper_(vtkSmartPointer::New()) , mesh_actor_(vtkSmartPointer::New())