VTK  9.1.0
TestQtCommon.h
Go to the documentation of this file.
3#include "QVTKOpenGLWidget.h"
4#include "QVTKOpenGLWindow.h"
5#include "QVTKRenderWidget.h"
7#include "vtkLogger.h"
8
9#include <QApplication>
10#include <QEventLoop>
11#include <QScopedPointer>
12#include <QSurfaceFormat>
13#include <QTimer>
14#include <memory>
15
16namespace detail
17{
18enum class Type
19{
25};
26
27Type select_widget(int argc, char* argv[]);
29std::shared_ptr<QObject> create_widget_or_window(Type type, vtkGenericOpenGLRenderWindow* renWin);
30std::shared_ptr<QWidget> create_widget(
31 Type type, vtkGenericOpenGLRenderWindow* renWin, QWidget* parent);
32vtkRenderWindow* get_render_window(std::shared_ptr<QObject> widgetOrWindow);
33void set_render_window(std::shared_ptr<QObject> widgetOrWindow, vtkRenderWindow* renWin);
35void show(std::shared_ptr<QObject> widgetOrWindow, const QSize& size);
36QImage grab_framebuffer(std::shared_ptr<QObject> widgetOrWindow);
37
38}
platform independent render window
create a window for renderers to draw into
@ USE_QVTKOPENGLNATIVEWIDGET
@ USE_QVTKOPENGLSTEREOWIDGET
void process_events_and_wait(int msec)
vtkRenderWindow * get_render_window(std::shared_ptr< QObject > widgetOrWindow)
QImage grab_framebuffer(std::shared_ptr< QObject > widgetOrWindow)
std::shared_ptr< QWidget > create_widget(Type type, vtkGenericOpenGLRenderWindow *renWin, QWidget *parent)
void show(std::shared_ptr< QObject > widgetOrWindow, const QSize &size)
std::shared_ptr< QObject > create_widget_or_window(Type type, vtkGenericOpenGLRenderWindow *renWin)
Type select_widget(int argc, char *argv[])
void set_default_format(Type type)
void set_render_window(std::shared_ptr< QObject > widgetOrWindow, vtkRenderWindow *renWin)