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 )
200 QString getName()
const;
205 virtual unsigned int numberOfViewedComponent();
210 virtual void refresh (
Viewer *whoIsAsking = NULL );
213 virtual QWidget * getWidget ( QWidget * parent );
216 virtual QObject * getPropertyObject();
219 virtual QMenu * getMenu();
222 virtual QToolBar * getToolBar();
230 void refreshRenderer();
236 void setActiveCamera ( QString cameraName );
241 vtkSmartPointer<vtkCamera> getCamera ( QString cameraName =
"default" );
244 void screenshot ( QString );
257 virtual void setGradientBackground (
bool );
260 bool getGradientBackground()
const;
263 virtual void setBackgroundColor ( QColor );
266 QColor getBackgroundColor()
const;
270 void setBackfaceCulling (
bool );
274 bool getBackfaceCulling()
const;
284 void setLinesAsTubes (
bool tubes );
288 void keyPressEvent ( QKeyEvent* e );
291 bool getLinesAsTubes()
const;
300 void setPointSize (
double size );
303 double getPointSize()
const;
313 return rendererWidget;
321 void setColorScale (
bool );
326 bool getColorScale()
const;
333 void setColorScaleMinMax (
double m,
double M );
338 void setColorScaleTitle ( QString t );
341 void initPicking ( PickingMode );
344 void getBoundsOfSelected (
double bound[6] );
347 void getBounds (
double bound[6] );
350 void setSideFrameVisible(
bool);
359 void actorPicked ( vtkSmartPointer<vtkPicker> );
363 void sliderChanged (
int );
366 void xAngleChanged (
double angle );
369 void yAngleChanged (
double angle );
372 void zAngleChanged (
double angle );
375 void toggleCopyright (
bool );
388 static QMap<QString, InteractiveViewer*>
viewers;
391 static QString defaultNames[5];
418 void toggleInterpolation();
424 void updateSelectionDisplay (
Component * );
427 QMultiMap<Component*, vtkSmartPointer<vtkProp> >
actorMap;
430 void addActor (
Component *, vtkSmartPointer<vtkProp> );
471 void updateActions();
553 void initWhatsThis();
556 void startWhatsThisSection (
const QString & title =
"" );
559 void endWhatsThisSection();
562 void addWhatsThisItem (
const QString & key,
const QString & description );
568 void renderingActorsChanged();
571 void highlightModeChanged ( QAction *selectedAction );
573 void cameraOrientationChanged ( QAction *selectedAction );
575 void viewControlModeChanged ( QAction* );
577 void backgroundColor();
579 void toggleAxes (
bool );
581 void pickingModeChanged ( QAction* );
586 void setLabel (
bool);