Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ( QObject parent,
const Handle(AIS_InteractiveContext)&  aisContext 
)

Constructor

References myHilightColor, mySelectColor, and setAISContext().

OCCViewer_AISSelector::~OCCViewer_AISSelector ( )

Destructor

Member Function Documentation

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::enableMultipleSelection ( bool  bEnable)

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

References myEnableMultipleSelection, and myEnableSelection.

void OCCViewer_AISSelector::enableSelection ( bool  bEnable)

Enables/disables selection

References myEnableSelection.

OCCViewer_AISSelector::Handle ( AIS_InteractiveContext  )
protected
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::select ( )

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

References checkSelection(), myEnableSelection, and myNumSelected.

void OCCViewer_AISSelector::selSelectionCancel ( bool  bAdded)
signal
void OCCViewer_AISSelector::selSelectionDone ( bool  bAdded)
signal
void OCCViewer_AISSelector::setAISContext ( const Handle(AIS_InteractiveContext)&  aisContext)

Sets the interactive context for this selector

References Handle(), myHilightColor, and mySelectColor.

void OCCViewer_AISSelector::setHilightColor ( Quantity_NameOfColor  color)

Sets the color to hilight the detected objects

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

void OCCViewer_AISSelector::setSelectColor ( Quantity_NameOfColor  color)

Sets the color to display the selected objects

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

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::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.

Member Data Documentation

bool OCCViewer_AISSelector::myEnableMultipleSelection
protected
bool OCCViewer_AISSelector::myEnableSelection
protected
Quantity_NameOfColor OCCViewer_AISSelector::myHilightColor
protected
int OCCViewer_AISSelector::myNumSelected
protected
Quantity_NameOfColor OCCViewer_AISSelector::mySelectColor
protected

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