Version: 9.15.0
OCCViewer_AISSelector Class Reference

#include <OCCViewer_AISSelector.h>

Inheritance diagram for OCCViewer_AISSelector:
Inheritance graph

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
 

Constructor & Destructor Documentation

◆ OCCViewer_AISSelector()

OCCViewer_AISSelector::OCCViewer_AISSelector ( QObject parent,
const Handle(AIS_InteractiveContext)&  aisContext 
)

Constructor

References myHilightColor, mySelectColor, and setAISContext().

◆ ~OCCViewer_AISSelector()

OCCViewer_AISSelector::~OCCViewer_AISSelector ( )

Destructor

Member Function Documentation

◆ checkSelection()

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().

◆ enableMultipleSelection()

void OCCViewer_AISSelector::enableMultipleSelection ( bool  bEnable)

Enables/disables multiple selection i.e selection of several objects at the same time.

References myEnableMultipleSelection, and myEnableSelection.

◆ enableSelection()

void OCCViewer_AISSelector::enableSelection ( bool  bEnable)

Enables/disables selection

References myEnableSelection.

◆ Handle()

OCCViewer_AISSelector::Handle ( AIS_InteractiveContext  )
protected

◆ moveTo()

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.

◆ select() [1/2]

bool OCCViewer_AISSelector::select ( )

Selects the detected interactive objects. Calls checkSelection() for checking the status.

References checkSelection(), myEnableSelection, and myNumSelected.

◆ select() [2/2]

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.

◆ selSelectionCancel

void OCCViewer_AISSelector::selSelectionCancel ( bool  bAdded)
signal

◆ selSelectionDone

void OCCViewer_AISSelector::selSelectionDone ( bool  bAdded)
signal

◆ setAISContext()

void OCCViewer_AISSelector::setAISContext ( const Handle(AIS_InteractiveContext)&  aisContext)

Sets the interactive context for this selector

References Handle(), myHilightColor, and mySelectColor.

◆ setHilightColor()

void OCCViewer_AISSelector::setHilightColor ( Quantity_NameOfColor  color)

Sets the color to hilight the detected objects

References OCCViewer::color(), Handle(), and myHilightColor.

◆ setSelectColor()

void OCCViewer_AISSelector::setSelectColor ( Quantity_NameOfColor  color)

Sets the color to display the selected objects

References OCCViewer::color(), Handle(), and mySelectColor.

◆ shiftSelect() [1/2]

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.

◆ shiftSelect() [2/2]

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.

Member Data Documentation

◆ myEnableMultipleSelection

bool OCCViewer_AISSelector::myEnableMultipleSelection
protected

◆ myEnableSelection

bool OCCViewer_AISSelector::myEnableSelection
protected

◆ myHilightColor

Quantity_NameOfColor OCCViewer_AISSelector::myHilightColor
protected

◆ myNumSelected

int OCCViewer_AISSelector::myNumSelected
protected

◆ mySelectColor

Quantity_NameOfColor OCCViewer_AISSelector::mySelectColor
protected

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