#include <OCCViewer_AISSelector.h>

Signals | |
| void | selSelectionDone (bool bAdded) |
| void | selSelectionCancel (bool bAdded) |
Public Member Functions | |
| OCCViewer_AISSelector (QObject *parent, const Handle(AIS_InteractiveContext)&) | |
| ~OCCViewer_AISSelector () | |
| void | enableSelection (bool) |
| void | enableMultipleSelection (bool) |
| bool | moveTo (int, int, const Handle(V3d_View)&) |
| bool | select (int, int, int, int, const Handle(V3d_View)&) |
| bool | shiftSelect (int, int, int, int, const Handle(V3d_View)&) |
| bool | select () |
| bool | shiftSelect () |
| void | setAISContext (const Handle(AIS_InteractiveContext)&) |
| void | setHilightColor (Quantity_NameOfColor color) |
| void | setSelectColor (Quantity_NameOfColor color) |
Protected Member Functions | |
| bool | checkSelection (AIS_StatusOfPick status, bool hadSelection, bool addTo) |
| Handle (AIS_InteractiveContext) myAISContext | |
Protected Attributes | |
| Quantity_NameOfColor | myHilightColor |
| Quantity_NameOfColor | mySelectColor |
| int | myNumSelected |
| bool | myEnableSelection |
| bool | myEnableMultipleSelection |
| OCCViewer_AISSelector::OCCViewer_AISSelector | ( | QObject * | parent, |
| const Handle(AIS_InteractiveContext)& | aisContext | ||
| ) |
Constructor
References myHilightColor, mySelectColor, and setAISContext().
| OCCViewer_AISSelector::~OCCViewer_AISSelector | ( | ) |
Destructor
| void OCCViewer_AISSelector::enableSelection | ( | bool | bEnable | ) |
Enables/disables selection
References myEnableSelection.
| void OCCViewer_AISSelector::enableMultipleSelection | ( | bool | bEnable | ) |
Enables/disables multiple selection i.e selection of several objects at the same time.
References myEnableMultipleSelection, and myEnableSelection.
| bool OCCViewer_AISSelector::moveTo | ( | int | x, |
| int | y, | ||
| const Handle(V3d_View)& | view | ||
| ) |
Detects the interactive objects at position (x,y). Returns 'true' if no error, 'false' otherwise.
References myEnableSelection.
| bool OCCViewer_AISSelector::select | ( | int | left, |
| int | top, | ||
| int | right, | ||
| int | bottom, | ||
| const Handle(V3d_View)& | view | ||
| ) |
Selects the objects covered by the rectangle. Multiple selection must be enabled to get use of this function. Calls checkSelection() for checking the status.
References checkSelection(), myEnableMultipleSelection, myEnableSelection, and myNumSelected.
| bool OCCViewer_AISSelector::shiftSelect | ( | int | left, |
| int | top, | ||
| int | right, | ||
| int | bottom, | ||
| const Handle(V3d_View)& | view | ||
| ) |
Adds new selected objects covered by the rectangle to the objects previously selected. Multiple selection must be enabled to get use of this function. Calls checkSelection() for checking the status.
References checkSelection(), myEnableMultipleSelection, myEnableSelection, and myNumSelected.
| bool OCCViewer_AISSelector::select | ( | ) |
Selects the detected interactive objects. Calls checkSelection() for checking the status.
References checkSelection(), myEnableSelection, and myNumSelected.
| bool OCCViewer_AISSelector::shiftSelect | ( | ) |
Adds new selected objects to the objects previously selected. Multiple selection must be enabled to get use of this function. Calls checkSelection() for checking the status.
References checkSelection(), myEnableMultipleSelection, myEnableSelection, and myNumSelected.
| void OCCViewer_AISSelector::setAISContext | ( | const Handle(AIS_InteractiveContext)& | aisContext | ) |
Sets the interactive context for this selector
References myHilightColor, and mySelectColor.
| void OCCViewer_AISSelector::setHilightColor | ( | Quantity_NameOfColor | color | ) |
Sets the color to hilight the detected objects
References myHilightColor.
| void OCCViewer_AISSelector::setSelectColor | ( | Quantity_NameOfColor | color | ) |
Sets the color to display the selected objects
References mySelectColor.
| bool OCCViewer_AISSelector::checkSelection | ( | AIS_StatusOfPick | status, |
| bool | hadSelection, | ||
| bool | addTo | ||
| ) | [protected] |
Checks the status of pick and emits 'selSelectionDone' or 'selSelectionCancel'. Returns 'true' if no error, 'false' otherwise.
References myNumSelected, selSelectionCancel(), and selSelectionDone().
| void OCCViewer_AISSelector.selSelectionDone | ( | bool | bAdded | ) | [signal] |
| void OCCViewer_AISSelector.selSelectionCancel | ( | bool | bAdded | ) | [signal] |
| OCCViewer_AISSelector.Handle | ( | AIS_InteractiveContext | ) | [protected] |
Quantity_NameOfColor OCCViewer_AISSelector.myHilightColor [protected] |
Quantity_NameOfColor OCCViewer_AISSelector.mySelectColor [protected] |
int OCCViewer_AISSelector.myNumSelected [protected] |
bool OCCViewer_AISSelector.myEnableSelection [protected] |
bool OCCViewer_AISSelector.myEnableMultipleSelection [protected] |