Public Types | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
pqRenderViewSelectionReaction Class Reference

pqRenderViewSelectionReaction handles various selection modes available on RenderViews. More...

#include <pqRenderViewSelectionReaction.h>

Inheritance diagram for pqRenderViewSelectionReaction:
Inheritance graph
[legend]
Collaboration diagram for pqRenderViewSelectionReaction:
Collaboration graph
[legend]

Public Types

enum  SelectionMode {
  SELECT_SURFACE_CELLS, SELECT_SURFACE_POINTS, SELECT_FRUSTUM_CELLS, SELECT_FRUSTUM_POINTS,
  SELECT_SURFACE_CELLS_POLYGON, SELECT_SURFACE_POINTS_POLYGON, SELECT_BLOCKS, SELECT_FRUSTUM_BLOCKS,
  SELECT_CUSTOM_BOX, SELECT_CUSTOM_POLYGON, ZOOM_TO_BOX, CLEAR_SELECTION,
  GROW_SELECTION, SHRINK_SELECTION, SELECT_SURFACE_POINTDATA_INTERACTIVELY, SELECT_SURFACE_CELLDATA_INTERACTIVELY,
  SELECT_SURFACE_CELLS_INTERACTIVELY, SELECT_SURFACE_POINTS_INTERACTIVELY, SELECT_SURFACE_POINTS_TOOLTIP, SELECT_SURFACE_CELLS_TOOLTIP
}
 

Signals

void selectedCustomBox (int xmin, int ymin, int xmax, int ymax)
 Signals emitted when the event happens. More...
 
void selectedCustomBox (const int region[4])
 Signals emitted when the event happens. More...
 
void selectedCustomPolygon (vtkIntArray *polygon)
 Signals emitted when the event happens. More...
 

Public Member Functions

 pqRenderViewSelectionReaction (QAction *parentAction, pqRenderView *view, SelectionMode mode, QActionGroup *modifierGroup=nullptr)
 If view is nullptr, this reaction will track the active-view maintained by pqActiveObjects. More...
 
 ~pqRenderViewSelectionReaction () override
 Call CleanupObservers on destruction. More...
 
- Public Member Functions inherited from pqSelectionReaction
 pqSelectionReaction (QAction *parent, QActionGroup *modifierGroup=nullptr)
 Constructor. More...
 
- Public Member Functions inherited from pqReaction
 pqReaction (QAction *parent, Qt::ConnectionType type=Qt::AutoConnection)
 Constructor. More...
 
 ~pqReaction () override
 
QAction * parentAction () const
 Provides access to the parent action. More...
 

Protected Slots

virtual void actionTriggered (bool val)
 For checkable actions, this calls this->beginSelection() or this->endSelection() is val is true or false, respectively. More...
 
void updateEnableState () override
 Handles enable state for the CLEAR_SELECTION, GROW_SELECTION, and SHRINK_SELECTION modes. More...
 
virtual void setView (pqView *view)
 Called when this object was created with nullptr as the view and the active view changes. More...
 
void setRepresentation (pqDataRepresentation *representation)
 Called when the active representation changes. More...
 
virtual void beginSelection ()
 starts the selection i.e. More...
 
virtual void endSelection ()
 finishes the selection. More...
 
virtual void preSelection ()
 makes the pre-selection. More...
 
virtual void fastPreSelection ()
 makes fast pre-selection. More...
 
virtual void onMouseStop ()
 callback called for mouse stop events when in 'interactive selection' modes. More...
 
virtual void clearSelectionCache ()
 clears the selection cache. More...
 
- Protected Slots inherited from pqSelectionReaction
virtual void modifiersChanged ()
 called when modifier group is changed. More...
 
- Protected Slots inherited from pqReaction
virtual void onTriggered ()
 Called when the action is triggered. More...
 
virtual void updateEnableState ()
 
virtual void updateMasterEnableState (bool)
 

Protected Member Functions

virtual void selectionChanged (vtkObject *, unsigned long, void *calldata)
 callback called when the vtkPVRenderView is done with selection. More...
 
virtual void onMouseMove ()
 callback called for mouse move events when in 'interactive selection' modes. More...
 
int getSelectionModifier () override
 Get the current state of selection modifier. More...
 
virtual bool isCompatible (SelectionMode mode)
 Check this selection is compatible with another type of selection. More...
 
virtual void UpdateTooltip ()
 Display/hide the tooltip of the selected point in mode SELECT_SURFACE_POINTS_TOOLTIP. More...
 
virtual void cleanupObservers ()
 cleans up observers. More...
 
virtual void onLeftButtonRelease ()
 callback called for click events when in 'interactive selection' modes. More...
 
virtual void onWheelRotate ()
 callback called for click events when in 'interactive selection' modes. More...
 
virtual void onRightButtonPressed ()
 callback called for click events when in 'interactive selection' modes. More...
 
virtual void onRightButtonRelease ()
 callback called for click events when in 'interactive selection' modes. More...
 
- Protected Member Functions inherited from pqSelectionReaction
virtual void uncheckSelectionModifiers ()
 Uncheck selection modifiers, if any. More...
 
virtual void disableSelectionModifiers (bool disable)
 Disable/Enable selection modifiers, if any. More...
 

Additional Inherited Members

- Protected Attributes inherited from pqSelectionReaction
QPointer< QActionGroup > ModifierGroup
 
- Protected Attributes inherited from pqReaction
bool IsMaster
 

Detailed Description

pqRenderViewSelectionReaction handles various selection modes available on RenderViews.

Simply create multiple instances of pqRenderViewSelectionReaction to handle selection modes for that RenderView. pqRenderViewSelectionReaction uses internal static members to ensure that at most 1 view (and 1 type of selection) is in selection-mode at any given time.

Definition at line 30 of file pqRenderViewSelectionReaction.h.

Member Enumeration Documentation

◆ SelectionMode

Enumerator
SELECT_SURFACE_CELLS 
SELECT_SURFACE_POINTS 
SELECT_FRUSTUM_CELLS 
SELECT_FRUSTUM_POINTS 
SELECT_SURFACE_CELLS_POLYGON 
SELECT_SURFACE_POINTS_POLYGON 
SELECT_BLOCKS 
SELECT_FRUSTUM_BLOCKS 
SELECT_CUSTOM_BOX 
SELECT_CUSTOM_POLYGON 
ZOOM_TO_BOX 
CLEAR_SELECTION 
GROW_SELECTION 
SHRINK_SELECTION 
SELECT_SURFACE_POINTDATA_INTERACTIVELY 
SELECT_SURFACE_CELLDATA_INTERACTIVELY 
SELECT_SURFACE_CELLS_INTERACTIVELY 
SELECT_SURFACE_POINTS_INTERACTIVELY 
SELECT_SURFACE_POINTS_TOOLTIP 
SELECT_SURFACE_CELLS_TOOLTIP 

Definition at line 36 of file pqRenderViewSelectionReaction.h.

Constructor & Destructor Documentation

◆ pqRenderViewSelectionReaction()

pqRenderViewSelectionReaction::pqRenderViewSelectionReaction ( QAction *  parentAction,
pqRenderView view,
SelectionMode  mode,
QActionGroup *  modifierGroup = nullptr 
)

If view is nullptr, this reaction will track the active-view maintained by pqActiveObjects.

◆ ~pqRenderViewSelectionReaction()

pqRenderViewSelectionReaction::~pqRenderViewSelectionReaction ( )
override

Call CleanupObservers on destruction.

Member Function Documentation

◆ selectedCustomBox [1/2]

void pqRenderViewSelectionReaction::selectedCustomBox ( int  xmin,
int  ymin,
int  xmax,
int  ymax 
)
signal

Signals emitted when the event happens.

◆ selectedCustomBox [2/2]

void pqRenderViewSelectionReaction::selectedCustomBox ( const int  region[4])
signal

Signals emitted when the event happens.

◆ selectedCustomPolygon

void pqRenderViewSelectionReaction::selectedCustomPolygon ( vtkIntArray polygon)
signal

Signals emitted when the event happens.

◆ actionTriggered

virtual void pqRenderViewSelectionReaction::actionTriggered ( bool  val)
protectedvirtualslot

For checkable actions, this calls this->beginSelection() or this->endSelection() is val is true or false, respectively.

For non-checkable actions, this call this->beginSelection() and this->endSelection() in that order.

◆ updateEnableState

void pqRenderViewSelectionReaction::updateEnableState ( )
overrideprotectedslot

Handles enable state for the CLEAR_SELECTION, GROW_SELECTION, and SHRINK_SELECTION modes.

◆ setView

virtual void pqRenderViewSelectionReaction::setView ( pqView view)
protectedvirtualslot

Called when this object was created with nullptr as the view and the active view changes.

Please note that this method will cast the pqView to a pqRenderView.

◆ setRepresentation

void pqRenderViewSelectionReaction::setRepresentation ( pqDataRepresentation representation)
protectedslot

Called when the active representation changes.

◆ beginSelection

virtual void pqRenderViewSelectionReaction::beginSelection ( )
protectedvirtualslot

starts the selection i.e.

setup render view in selection mode.

◆ endSelection

virtual void pqRenderViewSelectionReaction::endSelection ( )
protectedvirtualslot

finishes the selection.

Doesn't cause the selection, just returns the render view to previous interaction mode.

◆ preSelection

virtual void pqRenderViewSelectionReaction::preSelection ( )
protectedvirtualslot

makes the pre-selection.

◆ fastPreSelection

virtual void pqRenderViewSelectionReaction::fastPreSelection ( )
protectedvirtualslot

makes fast pre-selection.

◆ onMouseStop

virtual void pqRenderViewSelectionReaction::onMouseStop ( )
protectedvirtualslot

callback called for mouse stop events when in 'interactive selection' modes.

◆ clearSelectionCache

virtual void pqRenderViewSelectionReaction::clearSelectionCache ( )
protectedvirtualslot

clears the selection cache.

◆ selectionChanged()

virtual void pqRenderViewSelectionReaction::selectionChanged ( vtkObject ,
unsigned  long,
void *  calldata 
)
protectedvirtual

callback called when the vtkPVRenderView is done with selection.

◆ onMouseMove()

virtual void pqRenderViewSelectionReaction::onMouseMove ( )
protectedvirtual

callback called for mouse move events when in 'interactive selection' modes.

◆ onLeftButtonRelease()

virtual void pqRenderViewSelectionReaction::onLeftButtonRelease ( )
protectedvirtual

callback called for click events when in 'interactive selection' modes.

◆ onWheelRotate()

virtual void pqRenderViewSelectionReaction::onWheelRotate ( )
protectedvirtual

callback called for click events when in 'interactive selection' modes.

◆ onRightButtonPressed()

virtual void pqRenderViewSelectionReaction::onRightButtonPressed ( )
protectedvirtual

callback called for click events when in 'interactive selection' modes.

◆ onRightButtonRelease()

virtual void pqRenderViewSelectionReaction::onRightButtonRelease ( )
protectedvirtual

callback called for click events when in 'interactive selection' modes.

◆ getSelectionModifier()

int pqRenderViewSelectionReaction::getSelectionModifier ( )
overrideprotectedvirtual

Get the current state of selection modifier.

Reimplemented from pqSelectionReaction.

◆ isCompatible()

virtual bool pqRenderViewSelectionReaction::isCompatible ( SelectionMode  mode)
protectedvirtual

Check this selection is compatible with another type of selection.

◆ UpdateTooltip()

virtual void pqRenderViewSelectionReaction::UpdateTooltip ( )
protectedvirtual

Display/hide the tooltip of the selected point in mode SELECT_SURFACE_POINTS_TOOLTIP.

◆ cleanupObservers()

virtual void pqRenderViewSelectionReaction::cleanupObservers ( )
protectedvirtual

cleans up observers.


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