Version: 6.3.1
Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes

SVTK_RenderWindowInteractor Class Reference

Extends QVTK_RenderWindowInteractor functionality. More...

#include <SVTK_RenderWindowInteractor.h>

Inheritance diagram for SVTK_RenderWindowInteractor:
Inheritance graph

Public Slots

virtual void show ()
 Need for initial contents display on Win32.
virtual void polish ()
 To implement final initialization, just before the widget is displayed.
virtual void resize (int w, int h)
 To adjust widget and vtkRenderWindow size.

Signals

void MouseMove (QMouseEvent *)
void MouseButtonPressed (QMouseEvent *)
void MouseButtonReleased (QMouseEvent *)
void MouseDoubleClicked (QMouseEvent *)
void ButtonPressed (const QMouseEvent *event)
void ButtonReleased (const QMouseEvent *event)
void WheelMoved (QWheelEvent *)
void KeyPressed (QKeyEvent *)
void KeyReleased (QKeyEvent *)
void contextMenuRequested (QContextMenuEvent *e)
void selectionChanged ()

Public Member Functions

 SVTK_RenderWindowInteractor (QWidget *theParent, const char *theName)
 ~SVTK_RenderWindowInteractor ()
virtual void Initialize (vtkGenericRenderWindowInteractor *theDevice, SVTK_Renderer *theRenderer, SVTK_Selector *theSelector)
 To initialize properly the class.
SVTK_RendererGetRenderer ()
 To get corresponding SVTK_Renderer instance.
vtkRenderer * getRenderer ()
 To get corresponding SVTK_Renderer device (just to simplify collobaration with SVTK_Renderer)
vtkInteractorStyleGetInteractorStyle ()
 To get current interactor style.
void PushInteractorStyle (vtkInteractorStyle *theStyle)
 To change current interactor style by pushing the new one into the container.
void PopInteractorStyle ()
 To restore previous interactor style.
SVTK_SelectorGetSelector ()
 To get corresponding SVTK_Selector.
Selection_Mode SelectionMode () const
 To get current selection mode (just to simplify collobaration with SVTK_Selector)
void SetSelectionMode (Selection_Mode theMode)
 To change selection mode (just to simplify collobaration with SVTK_Selector)
void onEmitSelectionChanged ()
 To transform vtkCommand.EndPickEvent to Qt selectionChanged signal.
virtual void Initialize (vtkGenericRenderWindowInteractor *theDevice)
 To initialize by vtkGenericRenderWindowInteractor instance.
vtkGenericRenderWindowInteractorGetDevice ()
vtkRenderWindow * getRenderWindow ()
virtual void InvokeEvent (unsigned long theEvent, void *theCallData)
 Just to simplify usage of its device (vtkGenericRenderWindowInteractor)
virtual QPaintEngine * paintEngine () const
 Get paint engine for the scene.

Protected Types

typedef vtkSmartPointer
< vtkInteractorStyle
PInteractorStyle
typedef std::stack
< PInteractorStyle
TInteractorStyles

Protected Member Functions

virtual void mouseMoveEvent (QMouseEvent *)
virtual void mousePressEvent (QMouseEvent *)
virtual void mouseReleaseEvent (QMouseEvent *)
virtual void mouseDoubleClickEvent (QMouseEvent *)
virtual void wheelEvent (QWheelEvent *)
virtual void keyPressEvent (QKeyEvent *)
virtual void keyReleaseEvent (QKeyEvent *)
void SetRenderer (SVTK_Renderer *theRenderer)
void SetSelector (SVTK_Selector *theSelector)
void InitInteractorStyle (vtkInteractorStyle *theStyle)
virtual void paintEvent (QPaintEvent *)
virtual void resizeEvent (QResizeEvent *)
virtual void enterEvent (QEvent *)
virtual void leaveEvent (QEvent *)
virtual void contextMenuEvent (QContextMenuEvent *e)
virtual void focusInEvent (QFocusEvent *)
virtual void focusOutEvent (QFocusEvent *)
virtual bool x11Event (XEvent *e)
 To handle native events (from such devices as SpaceMouse)

Static Protected Member Functions

static void ProcessEvents (vtkObject *theObject, unsigned long theEvent, void *theClientData, void *theCallData)

Protected Attributes

vtkSmartPointer
< vtkCallbackCommand > 
myEventCallbackCommand
float myPriority
vtkSmartPointer< SVTK_SelectormySelector
vtkSmartPointer< SVTK_RenderermyRenderer
TInteractorStyles myInteractorStyles
vtkSmartPointer< vtkRenderWindow > myRenderWindow
vtkSmartPointer
< vtkGenericRenderWindowInteractor
myDevice

Detailed Description

Implements such features as support of selection, run-time interactor style management, one render window per one renderer collaboration and SUIT_ViewWindow events invocation.


Member Typedef Documentation


Constructor & Destructor Documentation

SVTK_RenderWindowInteractor::SVTK_RenderWindowInteractor ( QWidget theParent,
const char *  theName 
)

Constructor

References ProcessEvents().

SVTK_RenderWindowInteractor::~SVTK_RenderWindowInteractor ( )

Destructor


Member Function Documentation

void SVTK_RenderWindowInteractor::Initialize ( vtkGenericRenderWindowInteractor theDevice,
SVTK_Renderer theRenderer,
SVTK_Selector theSelector 
) [virtual]

To initialize properly the class

References QVTK_RenderWindowInteractor.Initialize().

SVTK_Renderer * SVTK_RenderWindowInteractor::GetRenderer ( )

To get corresponding SVTK_Renderer instance

vtkRenderer * SVTK_RenderWindowInteractor::getRenderer ( )
vtkInteractorStyle * SVTK_RenderWindowInteractor::GetInteractorStyle ( )

To get current interactor style

void SVTK_RenderWindowInteractor::PushInteractorStyle ( vtkInteractorStyle theStyle)

To change current interactor style by pushing the new one into the container

void SVTK_RenderWindowInteractor::PopInteractorStyle ( )

To restore previous interactor style

SVTK_Selector * SVTK_RenderWindowInteractor::GetSelector ( )

To get current selector

Selection_Mode SVTK_RenderWindowInteractor::SelectionMode ( ) const
void SVTK_RenderWindowInteractor::SetSelectionMode ( Selection_Mode  theMode)
void SVTK_RenderWindowInteractor::onEmitSelectionChanged ( )

Emits signal selectionChanged()

void SVTK_RenderWindowInteractor.MouseMove ( QMouseEvent *  ) [signal]
void SVTK_RenderWindowInteractor.MouseButtonPressed ( QMouseEvent *  ) [signal]
void SVTK_RenderWindowInteractor.MouseButtonReleased ( QMouseEvent *  ) [signal]
void SVTK_RenderWindowInteractor.MouseDoubleClicked ( QMouseEvent *  ) [signal]
void SVTK_RenderWindowInteractor.ButtonPressed ( const QMouseEvent *  event) [signal]
void SVTK_RenderWindowInteractor.ButtonReleased ( const QMouseEvent *  event) [signal]
void SVTK_RenderWindowInteractor.WheelMoved ( QWheelEvent *  ) [signal]
void SVTK_RenderWindowInteractor.KeyPressed ( QKeyEvent *  ) [signal]
void SVTK_RenderWindowInteractor.KeyReleased ( QKeyEvent *  ) [signal]
void SVTK_RenderWindowInteractor.contextMenuRequested ( QContextMenuEvent *  e) [signal]
void SVTK_RenderWindowInteractor.selectionChanged ( ) [signal]
void SVTK_RenderWindowInteractor::mouseMoveEvent ( QMouseEvent *  event) [protected, virtual]

Custom mouse move event handler

Reimplemented from QVTK_RenderWindowInteractor.

References GENERATE_SUIT_EVENTS, and QVTK_RenderWindowInteractor.mouseMoveEvent().

void SVTK_RenderWindowInteractor::mousePressEvent ( QMouseEvent *  event) [protected, virtual]

Custom mouse press event handler

Reimplemented from QVTK_RenderWindowInteractor.

References GENERATE_SUIT_EVENTS, and QVTK_RenderWindowInteractor.mousePressEvent().

void SVTK_RenderWindowInteractor::mouseReleaseEvent ( QMouseEvent *  event) [protected, virtual]
void SVTK_RenderWindowInteractor::mouseDoubleClickEvent ( QMouseEvent *  event) [protected, virtual]

Custom mouse double click event handler

Reimplemented from QVTK_RenderWindowInteractor.

References GENERATE_SUIT_EVENTS, and QVTK_RenderWindowInteractor.mouseDoubleClickEvent().

void SVTK_RenderWindowInteractor::wheelEvent ( QWheelEvent *  event) [protected, virtual]
void SVTK_RenderWindowInteractor::keyPressEvent ( QKeyEvent *  event) [protected, virtual]

Custom key press event handler

Reimplemented from QVTK_RenderWindowInteractor.

References GENERATE_SUIT_EVENTS, and QVTK_RenderWindowInteractor.keyPressEvent().

void SVTK_RenderWindowInteractor::keyReleaseEvent ( QKeyEvent *  event) [protected, virtual]

Custom key release event handler

Reimplemented from QVTK_RenderWindowInteractor.

References GENERATE_SUIT_EVENTS, and QVTK_RenderWindowInteractor.keyReleaseEvent().

void SVTK_RenderWindowInteractor::SetRenderer ( SVTK_Renderer theRenderer) [protected]

Changes renderer

Parameters:
theRenderer- new renderer
void SVTK_RenderWindowInteractor::SetSelector ( SVTK_Selector theSelector) [protected]

Changes selector

Parameters:
theSelector- new selector
void SVTK_RenderWindowInteractor::InitInteractorStyle ( vtkInteractorStyle theStyle) [protected]

Changes interactor style

Parameters:
theStyle- new interactor style
static void SVTK_RenderWindowInteractor.ProcessEvents ( vtkObject theObject,
unsigned long  theEvent,
void *  theClientData,
void *  theCallData 
) [static, protected]
void QVTK_RenderWindowInteractor::Initialize ( vtkGenericRenderWindowInteractor theDevice) [virtual, inherited]

To initialize by vtkGenericRenderWindowInteractor instance

vtkGenericRenderWindowInteractor * QVTK_RenderWindowInteractor::GetDevice ( ) [inherited]
Returns:
corresponding render window interactor
vtkRenderWindow * QVTK_RenderWindowInteractor::getRenderWindow ( ) [inherited]
Returns:
corresponding render window
void QVTK_RenderWindowInteractor::InvokeEvent ( unsigned long  theEvent,
void *  theCallData 
) [virtual, inherited]

Just to simplify usage of its device (vtkGenericRenderWindowInteractor)

QPaintEngine * QVTK_RenderWindowInteractor::paintEngine ( ) const [virtual, inherited]

Get paint engine for the scene

void QVTK_RenderWindowInteractor::show ( ) [virtual, slot, inherited]

Need for initial contents display on Win32

void QVTK_RenderWindowInteractor::polish ( ) [virtual, slot, inherited]

To implement final initialization, just before the widget is displayed

void QVTK_RenderWindowInteractor::resize ( int  w,
int  h 
) [virtual, slot, inherited]

To adjust widget and vtkRenderWindow size

void QVTK_RenderWindowInteractor::paintEvent ( QPaintEvent *  theEvent) [protected, virtual, inherited]

Custom paint event handler

void QVTK_RenderWindowInteractor::resizeEvent ( QResizeEvent *  theEvent) [protected, virtual, inherited]

Custom resize event handler

void QVTK_RenderWindowInteractor::enterEvent ( QEvent event) [protected, virtual, inherited]

Custom enter event handler

References FOCUS_UNDER_MOUSE.

void QVTK_RenderWindowInteractor::leaveEvent ( QEvent ) [protected, virtual, inherited]

Custom leave event handler

void QVTK_RenderWindowInteractor::contextMenuEvent ( QContextMenuEvent *  event) [protected, virtual, inherited]

Custom context menu event handler

void QVTK_RenderWindowInteractor::focusInEvent ( QFocusEvent *  event) [protected, virtual, inherited]

Reimplemented from QWidget in order to set window - receiver of space mouse events.

References SVTK_SpaceMouse.getInstance(), SVTK_SpaceMouse.initialize(), SVTK_SpaceMouse.isSpaceMouseOn(), and SVTK_SpaceMouse.setWindow().

void QVTK_RenderWindowInteractor::focusOutEvent ( QFocusEvent *  event) [protected, virtual, inherited]

Reimplemented from QWidget in order to set window - receiver of space mouse events.

References SVTK_SpaceMouse.getInstance(), SVTK_SpaceMouse.isSpaceMouseOn(), and SVTK_SpaceMouse.setWindow().

bool QVTK_RenderWindowInteractor::x11Event ( XEvent *  xEvent) [protected, virtual, inherited]

Field Documentation

vtkSmartPointer<vtkCallbackCommand> SVTK_RenderWindowInteractor.myEventCallbackCommand [protected]
vtkSmartPointer<vtkRenderWindow> QVTK_RenderWindowInteractor.myRenderWindow [protected, inherited]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS