27 #ifndef INTERACTIVE_VIEWER_H
28 #define INTERACTIVE_VIEWER_H
37 #include <QPushButton>
41 #include <vtkSmartPointer.h>
53 class SliderSpinBoxWidget;
54 class GeometricObject;
55 class InterfaceGeometry;
56 class InterfaceBitMap;
134 Q_PROPERTY (
HighlightMode highlightMode READ getHighlightMode WRITE setHighlightMode )
135 Q_PROPERTY ( QColor backgroundColor READ getBackgroundColor WRITE setBackgroundColor )
136 Q_PROPERTY (
bool gradientBackground READ getGradientBackground WRITE setGradientBackground )
137 Q_PROPERTY (
bool linesAsTubes READ getLinesAsTubes WRITE setLinesAsTubes )
138 Q_PROPERTY (
bool backfaceCulling READ getBackfaceCulling WRITE setBackfaceCulling )
139 Q_PROPERTY (
double pointSize READ getPointSize WRITE setPointSize )
201 QString getName()
const;
208 virtual unsigned int numberOfViewedComponent();
211 virtual void refresh (
Viewer *whoIsAsking = NULL );
214 virtual QWidget * getWidget ( QWidget * parent );
217 virtual QObject * getPropertyObject();
220 virtual QMenu * getMenu();
223 virtual QToolBar * getToolBar();
231 void refreshRenderer();
237 void setActiveCamera ( QString cameraName );
242 vtkSmartPointer<vtkCamera> getCamera ( QString cameraName =
"default" );
245 void screenshot ( QString );
258 virtual void setGradientBackground (
bool );
261 bool getGradientBackground()
const;
264 virtual void setBackgroundColor ( QColor );
267 QColor getBackgroundColor()
const;
271 void setBackfaceCulling (
bool );
275 bool getBackfaceCulling()
const;
285 void setLinesAsTubes (
bool tubes );
289 void keyPressEvent ( QKeyEvent* e );
292 bool getLinesAsTubes()
const;
301 void setPointSize (
double size );
304 double getPointSize()
const;
314 return rendererWidget;
324 void setColorScale (
bool );
327 bool getColorScale()
const;
334 void setColorScaleMinMax (
double m,
double M );
339 void setColorScaleTitle ( QString t );
342 void initPicking ( PickingMode );
345 void getBoundsOfSelected (
double bound[6] );
348 void getBounds (
double bound[6] );
351 void setSideFrameVisible(
bool);
360 void actorPicked ( vtkSmartPointer<vtkPicker> );
364 void sliderChanged (
int );
367 void xAngleChanged (
double angle );
370 void yAngleChanged (
double angle );
373 void zAngleChanged (
double angle );
376 void toggleCopyright (
bool );
389 static QMap<QString, InteractiveViewer*>
viewers;
392 static QString defaultNames[5];
419 void toggleInterpolation();
425 void updateSelectionDisplay (
Component * );
428 QMultiMap<Component*, vtkSmartPointer<vtkProp> >
actorMap;
431 void addActor (
Component *, vtkSmartPointer<vtkProp> );
472 void updateActions();
554 void initWhatsThis();
557 void startWhatsThisSection (
const QString & title =
"" );
560 void endWhatsThisSection();
563 void addWhatsThisItem (
const QString & key,
const QString &
description );
570 void renderingActorsChanged();
572 void highlightModeChanged ( QAction *selectedAction );
574 void cameraOrientationChanged ( QAction *selectedAction );
576 void viewControlModeChanged ( QAction* );
578 void backgroundColor();
580 void toggleAxes (
bool );
582 void pickingModeChanged ( QAction* );
587 void setLabel (
bool);