#include <GLViewer_Selector2d.h>
Public Member Functions | |
GLViewer_Selector2d (GLViewer_Viewer2d *, GLViewer_Context *) | |
~GLViewer_Selector2d () | |
void | setContext (GLViewer_Context *glc) |
Sets context from Viewer2d. More... | |
GLViewer_Context * | getContext () const |
virtual void | setHilightColor (Quantity_NameOfColor) |
virtual void | setSelectColor (Quantity_NameOfColor) |
virtual void | detect (int, int) |
virtual void | undetectAll () |
virtual void | select (bool append=false) |
virtual void | select (const QRect &, bool append=false) |
virtual void | unselectAll () |
virtual int | numSelected () const |
virtual void | checkSelection (int, bool, int) |
Public Member Functions inherited from GLViewer_Selector | |
GLViewer_Selector (GLViewer_Viewer *) | |
~GLViewer_Selector () | |
void | lock (bool) |
Sets lock status (enable/disable interavtive) More... | |
void | setMinRectSize (const QSize &minSize) |
Protected Attributes | |
GLViewer_Context * | myGLContext |
Protected Attributes inherited from GLViewer_Selector | |
GLViewer_Viewer * | myViewer |
bool | myLocked |
QSize | myMinRectSize |
Additional Inherited Members | |
Signals inherited from GLViewer_Selector | |
void | selSelectionCancel () |
void | selSelectionDone (bool append, SelectionChangeStatus status) |
Static Public Member Functions inherited from GLViewer_Selector | |
static int | appendKey () |
static void | setAppendKey (int k) |
2D select manager for GLViewer
GLViewer_Selector2d::GLViewer_Selector2d | ( | GLViewer_Viewer2d * | v2d, |
GLViewer_Context * | glc | ||
) |
Constructor
GLViewer_Selector2d::~GLViewer_Selector2d | ( | ) |
Destructor
|
virtual |
Checks selection state and emits 'selSelectionDone' or 'selSelectionCancel' Should be called by after non-interactive selection.
Implements GLViewer_Selector.
References numSelected(), SCS_Global, SCS_Local, GLViewer_Selector::selSelectionCancel(), GLViewer_Selector::selSelectionDone(), SS_GlobalChanged, and SS_LocalChanged.
|
virtual |
Detects object at point
x,y | - point co-ordinates |
Implements GLViewer_Selector.
References GLViewer_Viewer::getActiveView(), GLViewer_Viewer::getSelectionMode(), GLViewer_ViewFrame::getViewPort(), GLViewer_Context::MoveTo(), myGLContext, GLViewer_Selector::myLocked, GLViewer_Selector::myViewer, and GLViewer_Viewer::NoSelection.
|
inline |
|
virtual |
Implements GLViewer_Selector.
References myGLContext, and GLViewer_Context::NbSelected().
|
virtual |
Selects previously hilighted objects
append | - append objects to selection |
Implements GLViewer_Selector.
References checkSelection(), GLViewer_Viewer::getActiveView(), GLViewer_Viewer::getSelectionMode(), GLViewer_ViewFrame::getViewPort(), GLViewer_Viewer::Multiple, myGLContext, GLViewer_Selector::myLocked, GLViewer_Selector::myViewer, GLViewer_Viewer::NoSelection, numSelected(), and GLViewer_Context::Select().
|
virtual |
Selects objects in rectangle
selRect | - selection rectangle |
append | - append objects to selection |
Implements GLViewer_Selector.
References checkSelection(), GLViewer_Viewer::getActiveView(), GLViewer_Viewer::getSelectionMode(), GLViewer_ViewFrame::getViewPort(), GLViewer_Viewer::Multiple, myGLContext, GLViewer_Selector::myLocked, GLViewer_Selector::myViewer, GLViewer_Viewer::NoSelection, numSelected(), and GLViewer_Context::SelectByRect().
|
inline |
|
virtual |
Changes hilight color of context
color | - new hilight color |
Implements GLViewer_Selector.
References myGLContext, and GLViewer_Context::SetHighlightColor().
|
virtual |
Changes selection color of context
color | - new selection color |
Implements GLViewer_Selector.
References myGLContext, and GLViewer_Context::SetSelectionColor().
|
virtual |
Undetects all objects
Implements GLViewer_Selector.
References GLViewer_Context::clearHighlighted(), GLViewer_Viewer::getActiveView(), GLViewer_Viewer::getSelectionMode(), GLViewer_ViewFrame::getViewPort(), myGLContext, GLViewer_Selector::myLocked, GLViewer_Selector::myViewer, and GLViewer_Viewer::NoSelection.
|
virtual |
Unselects all objects
Implements GLViewer_Selector.
References GLViewer_Selector::myLocked, GLViewer_Selector::myViewer, numSelected(), and GLViewer_Selector::selSelectionCancel().
|
protected |