21 #ifndef __ctkVTKAbstractView_h 22 #define __ctkVTKAbstractView_h 28 #if CTK_USE_QVTKOPENGLWIDGET 29 #include <QVTKOpenGLWidget.h> 31 #include <QVTKWidget.h> 36 #include "ctkVisualizationVTKWidgetsExport.h" 37 class ctkVTKAbstractViewPrivate;
39 class vtkCornerAnnotation;
40 class vtkInteractorObserver;
41 class vtkRenderWindowInteractor;
42 class vtkRenderWindow;
49 Q_PROPERTY(QString cornerAnnotationText READ cornerAnnotationText WRITE setCornerAnnotationText)
50 Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
51 Q_PROPERTY(QColor backgroundColor2 READ backgroundColor2 WRITE setBackgroundColor)
52 Q_PROPERTY(
bool gradientBackground READ gradientBackground WRITE setGradientBackground)
53 Q_PROPERTY(
bool renderEnabled READ renderEnabled WRITE setRenderEnabled)
57 Q_PROPERTY(
bool fpsVisible READ isFPSVisible WRITE setFPSVisible)
61 Q_PROPERTY(
bool useDepthPeeling READ useDepthPeeling WRITE setUseDepthPeeling)
73 virtual
void scheduleRender();
78 virtual
void forceRender();
81 virtual
void setBackgroundColor(const QColor& newBackgroundColor);
85 virtual
void setBackgroundColor2(const QColor& newBackgroundColor);
89 virtual
void setGradientBackground(
bool enable);
92 void setRenderEnabled(
bool value);
95 virtual
void setCornerAnnotationText(const QString& text);
98 void setFPSVisible(
bool show);
102 void setUseDepthPeeling(
bool use);
106 Q_INVOKABLE vtkRenderWindow* renderWindow()const;
109 Q_INVOKABLE vtkRenderWindowInteractor* interactor()const;
114 virtual
void setInteractor(vtkRenderWindowInteractor* interactor);
117 Q_INVOKABLE vtkInteractorObserver* interactorStyle()const;
120 QString cornerAnnotationText() const;
121 Q_INVOKABLE vtkCornerAnnotation* cornerAnnotation()const;
124 #if CTK_USE_QVTKOPENGLWIDGET 125 Q_INVOKABLE QVTKOpenGLWidget * VTKWidget()
const;
127 Q_INVOKABLE QVTKWidget * VTKWidget()
const;
131 virtual QColor backgroundColor()
const;
134 virtual QColor backgroundColor2()
const;
137 virtual bool gradientBackground()
const;
140 bool renderEnabled()
const;
143 bool isFPSVisible()
const;
150 bool useDepthPeeling()
const;
161 static void setMultiSamples(
int);
165 static int multiSamples();
167 virtual QSize minimumSizeHint()
const;
168 virtual QSize sizeHint()
const;
169 virtual bool hasHeightForWidth()
const;
170 virtual int heightForWidth(
int width)
const;
177 QScopedPointer<ctkVTKAbstractViewPrivate>
d_ptr;
#define QVTK_OBJECT
Define VTK/Qt event/slot connection utility methods. It is a convenient macro that declares and defin...
QScopedPointer< ctkVTKAbstractViewPrivate > d_ptr