ParaView
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
pqRubberBandHelper Class Reference

Utility to switch interactor styles in 3D views. More...

#include <pqRubberBandHelper.h>

List of all members.

Public Types

enum  Modes {
  INTERACT, SELECT, SELECT_POINTS, FRUSTUM,
  FRUSTUM_POINTS, BLOCKS, ZOOM, PICK,
  PICK_ON_CLICK
}

Public Slots

void setView (pqView *)
 Set active view.
void beginSurfaceSelection ()
 Begin rubber band surface selection on the view.
void beginSurfacePointsSelection ()
void beginFrustumSelection ()
void beginFrustumPointsSelection ()
void beginBlockSelection ()
void beginZoom ()
void beginPick ()
void beginPickOnClick ()
void endSelection ()
 End rubber band selection.
void endPick ()
void endZoom ()
void DisabledPush ()
 Called to disable selection.
void DisabledPop ()
 Called to pop disabling of selection.

Signals

void selectionFinished (int xmin, int ymin, int xmax, int ymax)
 fired after mouse up in selection mode
void enableSurfaceSelection (bool enabled)
 Fired to indicate whether the selection can be created on the currently set view.
void enableSurfacePointsSelection (bool enabled)
void enableFrustumSelection (bool enabled)
void enableFrustumPointSelection (bool enabled)
void enableBlockSelection (bool enabled)
void enableZoom (bool enabled)
void enablePick (bool enabled)
void selectionModeChanged (int selectionMode)
 Fired with selection mode changes.
void interactionModeChanged (bool notselectable)
 This is inverse of selectionModeChanged signal, provided for convenience.
void startSelection ()
 Fired to mark the start and ends of election.
void stopSelection ()

Public Member Functions

 pqRubberBandHelper (QObject *parent=NULL)
virtual ~pqRubberBandHelper ()
pqRenderViewgetRenderView () const
 Returns the currently selected render view.
virtual bool eventFilter (QObject *watched, QEvent *event)
 Used in PICK_ON_CLICK mode to capture click events from the rendering widget.

Protected Slots

void emitEnabledSignals ()
void delayedSelectionChanged ()

Protected Member Functions

int setRubberBandOn (int mode)
int setRubberBandOff ()
void onSelectionChanged (vtkObject *, unsigned long, void *)

Protected Attributes

int Mode
int Xs
int Ys
int Xe
int Ye
int DisableCount

Detailed Description

Utility to switch interactor styles in 3D views.

pqRubberBandHelper standardizes the mechanism by which 3D views are switched between interaction and rubber band modes. TODO: We may want to extend this class to create different type of selections i.e. surface/frustrum.

Definition at line 50 of file pqRubberBandHelper.h.


Member Enumeration Documentation

Enumerator:
INTERACT 
SELECT 
SELECT_POINTS 
FRUSTUM 
FRUSTUM_POINTS 
BLOCKS 
ZOOM 
PICK 
PICK_ON_CLICK 

Definition at line 62 of file pqRubberBandHelper.h.


Constructor & Destructor Documentation

pqRubberBandHelper::pqRubberBandHelper ( QObject *  parent = NULL)
virtual pqRubberBandHelper::~pqRubberBandHelper ( ) [virtual]

Member Function Documentation

pqRenderView* pqRubberBandHelper::getRenderView ( ) const

Returns the currently selected render view.

virtual bool pqRubberBandHelper::eventFilter ( QObject *  watched,
QEvent *  event 
) [virtual]

Used in PICK_ON_CLICK mode to capture click events from the rendering widget.

void pqRubberBandHelper::setView ( pqView ) [slot]

Set active view.

If a view has been set previously, this method ensures that it is not in selection mode.

void pqRubberBandHelper::beginSurfaceSelection ( ) [slot]

Begin rubber band surface selection on the view.

Has any effect only if active view is a render view.

void pqRubberBandHelper::beginSurfacePointsSelection ( ) [slot]
void pqRubberBandHelper::beginFrustumSelection ( ) [slot]
void pqRubberBandHelper::beginFrustumPointsSelection ( ) [slot]
void pqRubberBandHelper::beginBlockSelection ( ) [slot]
void pqRubberBandHelper::beginZoom ( ) [slot]
void pqRubberBandHelper::beginPick ( ) [slot]
void pqRubberBandHelper::beginPickOnClick ( ) [slot]
void pqRubberBandHelper::endSelection ( ) [slot]

End rubber band selection.

Has any effect only if active view is a render view.

void pqRubberBandHelper::endPick ( ) [inline, slot]

Definition at line 102 of file pqRubberBandHelper.h.

void pqRubberBandHelper::endZoom ( ) [inline, slot]

Definition at line 104 of file pqRubberBandHelper.h.

void pqRubberBandHelper::DisabledPush ( ) [slot]

Called to disable selection.

void pqRubberBandHelper::DisabledPop ( ) [slot]

Called to pop disabling of selection.

If there are as many DisabledPop() as DisabledPush(), the selection will be enabled.

void pqRubberBandHelper::selectionFinished ( int  xmin,
int  ymin,
int  xmax,
int  ymax 
) [signal]

fired after mouse up in selection mode

void pqRubberBandHelper::enableSurfaceSelection ( bool  enabled) [signal]

Fired to indicate whether the selection can be created on the currently set view.

void pqRubberBandHelper::enableSurfacePointsSelection ( bool  enabled) [signal]
void pqRubberBandHelper::enableFrustumSelection ( bool  enabled) [signal]
void pqRubberBandHelper::enableFrustumPointSelection ( bool  enabled) [signal]
void pqRubberBandHelper::enableBlockSelection ( bool  enabled) [signal]
void pqRubberBandHelper::enableZoom ( bool  enabled) [signal]
void pqRubberBandHelper::enablePick ( bool  enabled) [signal]
void pqRubberBandHelper::selectionModeChanged ( int  selectionMode) [signal]

Fired with selection mode changes.

selectionMode is enum Modes{...}.

void pqRubberBandHelper::interactionModeChanged ( bool  notselectable) [signal]

This is inverse of selectionModeChanged signal, provided for convenience.

void pqRubberBandHelper::startSelection ( ) [signal]

Fired to mark the start and ends of election.

void pqRubberBandHelper::stopSelection ( ) [signal]
void pqRubberBandHelper::emitEnabledSignals ( ) [protected, slot]
void pqRubberBandHelper::delayedSelectionChanged ( ) [inline, protected, slot]

Definition at line 141 of file pqRubberBandHelper.h.

int pqRubberBandHelper::setRubberBandOn ( int  mode) [protected]
int pqRubberBandHelper::setRubberBandOff ( ) [protected]
void pqRubberBandHelper::onSelectionChanged ( vtkObject ,
unsigned  long,
void *   
) [protected]

Member Data Documentation

Definition at line 149 of file pqRubberBandHelper.h.

Definition at line 150 of file pqRubberBandHelper.h.

Definition at line 150 of file pqRubberBandHelper.h.

Definition at line 150 of file pqRubberBandHelper.h.

Definition at line 150 of file pqRubberBandHelper.h.

Definition at line 151 of file pqRubberBandHelper.h.


The documentation for this class was generated from the following file: