void
SetInteractor( vtkRenderWindowInteractor* );
- //!
+ //! To invoke #vtkRenderWindowInteractor::CreateTimer
virtual
void
Render();
- // redefined in order to cach rendering
+ //! To implement cached rendering
virtual
void
OnTimer();
- // VTK events
+ //! To reset reset view
virtual
void
OnConfigure();
+ //! To handle mouse move event
virtual
void
OnMouseMove();
+ //! To handle left mouse button down event (reimplemented from #vtkInteractorStyle)
virtual
void
OnLeftButtonDown();
+ //! To handle left mouse button up event (reimplemented from #vtkInteractorStyle)
virtual
void
OnLeftButtonUp();
+ //! To handle middle mouse button down event (reimplemented from #vtkInteractorStyle)
virtual
void
OnMiddleButtonDown();
+ //! To handle middle mouse button up event (reimplemented from #vtkInteractorStyle)
virtual
void
OnMiddleButtonUp();
+ //! To handle right mouse button down event (reimplemented from #vtkInteractorStyle)
virtual
void
OnRightButtonDown();
+ //! To handle right mouse button up event (reimplemented from #vtkInteractorStyle)
virtual
void
OnRightButtonUp();
+ //! To handle keyboard event (reimplemented from #vtkInteractorStyle)
virtual
void
OnChar();
void
IncrementalRotate( const int incrX, const int incrY );
- // custom event handling function (to handle 3d space mouse events)
+ // Main process event method (reimplemented from #vtkInteractorStyle)
static
void
ProcessEvents(vtkObject* object,
float RadianToDegree; // constant: for conv from deg to rad
double myScale;
- public:
+ protected:
void startZoom();
void startPan();
void startGlobalPan();
bool myShiftState;
int ForcedState;
- // "increment" for pan/rotate/zoom operations
+ //! "Increment" for pan/rotate/zoom operations
int mySpeedIncrement;
// SpaceMouse short cuts
int mySMIncreaseSpeedBtn;
int mySMDominantCombinedSwitchBtn;
- QWidget* myRenderWidget;
vtkSmartPointer<SVTK_GenericRenderWindowInteractor> myInteractor;
PSelectionEvent mySelectionEvent;
class SVTK_Selector;
class SVTK_Renderer;
-// ------------------------------------------------------------
+//============================================================================
+//! Implemements Qt based vtkRenderWindowInteractor.
+/*!
+ The class inherits #QWidget class in order to be possible process Qt events.
+ It invokes corresponding VTK events through usage of its device - a #vtkGenericRenderWindowInteractor.
+ Also, it creates, initialize and holds vtkRenderWindow instance.
+*/
class SVTK_EXPORT QVTK_RenderWindowInteractor: public QWidget
{
Q_OBJECT;
~QVTK_RenderWindowInteractor();
+ //! To initialize by #vtkGenericRenderWindowInteractor instance
virtual
void
Initialize(vtkGenericRenderWindowInteractor* theDevice);
vtkRenderWindow*
getRenderWindow();
+ //! Just to simplify usage of its device (#vtkGenericRenderWindowInteractor)
virtual
void
InvokeEvent(unsigned long theEvent, void* theCallData);
public slots:
+ //! Need for initial contents display on Win32
virtual void show();
+
+ //! To implement final initialization, just before the widget is displayed
virtual void polish();
+
+ //! To adjust widget and vtkRenderWindow size
virtual void resize(int w, int h);
protected:
virtual void focusInEvent( QFocusEvent* );
virtual void focusOutEvent( QFocusEvent* );
+ //! To handle native X11 events (from such devices as SpaceMouse)
virtual bool x11Event( XEvent *e );
QWidget* myPreviousFocusWidget;
};
-// ------------------------------------------------------------
+//============================================================================
+//! Extends QVTK_RenderWindowInteractor functionality.
+/*!
+ Implements such features as
+ support of selection,
+ run-time interactor style management,
+ one render window per one renderer collaboration,
+ SUIT_ViewWindow events invocation.
+*/
class SVTK_EXPORT SVTK_RenderWindowInteractor: public QVTK_RenderWindowInteractor
{
Q_OBJECT;