SPV3D_CADSelection handles various selection modes available on RenderViews. More...
#include <SPV3D_CADSelection.h>

Public Types | |
| enum | SelectionMode { SELECT_SOLIDS , SELECT_FACES , SELECT_EDGES , SELECT_VERTICES } |
Public Slots | |
| virtual void | actionTriggered (bool val) |
| For checkable actions, this calls this->beginSelection() or this->endSelection() is val is true or false, respectively. More... | |
Public Member Functions | |
| SPV3D_CADSelection (QObject *parent, pqRenderView *view, SelectionMode mode) | |
If view is nullptr, this reaction will track the active-view maintained by pqActiveObjects. More... | |
| ~SPV3D_CADSelection () override | |
| void | SetMode (const SPV3D_CADSelection::SelectionMode mode) |
| Set the selectionMode. More... | |
Private Slots | |
| 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... | |
| void | beginSelection () |
| starts the selection i.e. More... | |
| void | endSelection () |
| finishes the selection. More... | |
| void | updateEnableState () |
| void | onRightButtonPress () |
| Disable preselection during rotation using the right button. More... | |
| void | onRightButtonRelease () |
Private Member Functions | |
| void | selectionChanged (vtkObject *, unsigned long, void *calldata) |
| callback called when the vtkPVRenderView is done with selection. More... | |
| void | onMouseMove () |
| callback called for mouse move events when in 'interactive selection' modes. More... | |
| void | onLeftButtonRelease () |
| callback called for click events when in 'interactive selection' modes. More... | |
| int | getSelectionModifier () |
| void | fastSelection (bool presel=false) |
| makes fast selection. More... | |
| void | cleanupObservers () |
| cleans up observers. More... | |
| Q_DISABLE_COPY (SPV3D_CADSelection) QPointer< pqRenderView > View | |
Private Attributes | |
| QPointer< pqDataRepresentation > | Representation |
| QMetaObject::Connection | RepresentationConnection |
| vtkSMRepresentationProxy * | CurrentRepresentation = nullptr |
| SelectionMode | Mode |
| int | PreviousRenderViewMode |
| vtkWeakPointer< vtkObject > | ObservedObject |
| unsigned long | ObserverIds [4] |
| int | MousePosition [2] |
| QComboBox * | selectionComboBox |
| bool | DisablePreSelection = false |
SPV3D_CADSelection handles various selection modes available on RenderViews.
Simply create multiple instances of SPV3D_CADSelection to handle selection modes for that RenderView. SPV3D_CADSelection uses internal static members to ensure that at most 1 view (and 1 type of selection) is in selection-mode at any given time.
| SPV3D_CADSelection::SPV3D_CADSelection | ( | QObject * | parent, |
| pqRenderView * | view, | ||
| SelectionMode | mode | ||
| ) |
If view is nullptr, this reaction will track the active-view maintained by pqActiveObjects.
References Mode, MousePosition, ObserverIds, PreviousRenderViewMode, setRepresentation(), setView(), updateEnableState(), and View.
|
override |
References cleanupObservers().
|
virtualslot |
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.
References beginSelection(), and endSelection().
|
privateslot |
starts the selection i.e.
setup render view in selection mode.
References ObservedObject, ObserverIds, onLeftButtonRelease(), onMouseMove(), onRightButtonPress(), onRightButtonRelease(), PreviousRenderViewMode, and View.
|
private |
cleans up observers.
References ObservedObject, and ObserverIds.
|
privateslot |
finishes the selection.
Doesn't cause the selection, just returns the render view to previous interaction mode.
References cleanupObservers(), CurrentRepresentation, PreviousRenderViewMode, and View.
|
private |
makes fast selection.
References CurrentRepresentation, Mode, MousePosition, SELECT_EDGES, SELECT_FACES, SELECT_SOLIDS, SELECT_VERTICES, and View.
|
private |
References View.
|
private |
callback called for click events when in 'interactive selection' modes.
References fastSelection().
|
private |
callback called for mouse move events when in 'interactive selection' modes.
References DisablePreSelection, fastSelection(), SPV3D_Prs::FromVtkIdToEntry(), and Representation.
|
privateslot |
Disable preselection during rotation using the right button.
References DisablePreSelection.
|
privateslot |
References DisablePreSelection.
|
private |
|
private |
callback called when the vtkPVRenderView is done with selection.
References endSelection(), getSelectionModifier(), and View.
| void SPV3D_CADSelection::SetMode | ( | const SPV3D_CADSelection::SelectionMode | mode | ) |
Set the selectionMode.
References Mode.
|
privateslot |
Called when the active representation changes.
References endSelection(), Representation, RepresentationConnection, and updateEnableState().
|
privateslot |
Called when this object was created with nullptr as the view and the active view changes.
References endSelection(), and View.
|
privateslot |
References endSelection(), Mode, Representation, SELECT_FACES, and SELECT_VERTICES.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |