Hide menu
cadex::ModelPrs_SelectionChangesObserver Class Referenceabstract

Defines an observer on selection events. More...

Public Member Functions

 ModelPrs_SelectionChangesObserver ()
 Constructor.
 
virtual ~ModelPrs_SelectionChangesObserver ()
 Destructor.
 
virtual void SelectionChangedByScene (const ModelPrs_Selection &theCurrent, const ModelPrs_Selection &theSelected, const ModelPrs_Selection &theDeselected)=0
 The method is invoked when the source of the selection event is mouse click on the scene. More...
 
virtual void SelectionChangedByManager (const ModelPrs_Selection &theCurrent, const ModelPrs_Selection &theSelected, const ModelPrs_Selection &theDeselected)=0
 The method is invoked when the source of the selection event is the manager's method call. More...
 

Detailed Description

Defines an observer on selection events.

Warning
This class is a part of Visualization Toolkit add-on, which is licensed separately from the base CAD Exchanger SDK.

You need override SelectionChangedByScene() and SelectionChangedByManager() methods and add observer to Selection Manager via ModelPrs_SelectionManager::Register().

See also
Hover and selection, ModelPrs_Selection
Examples
visualization/qtquick_qml/manipulator/main.cxx, visualization/qtquick_qml/measurements/main.cxx, and visualization/qtquick_qml/selectionhandling/main.cxx.

Member Function Documentation

◆ SelectionChangedByManager()

void cadex::ModelPrs_SelectionChangesObserver::SelectionChangedByManager ( const ModelPrs_Selection theCurrent,
const ModelPrs_Selection theSelected,
const ModelPrs_Selection theDeselected 
)
pure virtual

The method is invoked when the source of the selection event is the manager's method call.

See also
ModelPrs_SelectionManager::Select(), ModelPrs_SelectionManager::Deselect(), ModelPrs_SelectionManager::DeselectAll()

Where parameters mean:

  • Current this is full scene selection.
  • Selected this is the new selection since the last selection event.
  • Selected this is the new deselection since the last selection event.
Examples
visualization/qtquick_qml/manipulator/main.cxx, visualization/qtquick_qml/measurements/main.cxx, and visualization/qtquick_qml/selectionhandling/main.cxx.

◆ SelectionChangedByScene()

void cadex::ModelPrs_SelectionChangesObserver::SelectionChangedByScene ( const ModelPrs_Selection theCurrent,
const ModelPrs_Selection theSelected,
const ModelPrs_Selection theDeselected 
)
pure virtual

The method is invoked when the source of the selection event is mouse click on the scene.

Where parameters mean:

  • Current this is full scene selection.
  • Selected this is the new selection since the last selection event.
  • Selected this is the new deselection since the last selection event.
Examples
visualization/qtquick_qml/manipulator/main.cxx, visualization/qtquick_qml/measurements/main.cxx, and visualization/qtquick_qml/selectionhandling/main.cxx.