#include <GLViewer_Selector2d.h>

Signals | |
| void | selSelectionCancel () |
| void | selSelectionDone (bool append, SelectionChangeStatus status) |
Public Member Functions | |
| GLViewer_Selector2d (GLViewer_Viewer2d *, GLViewer_Context *) | |
| ~GLViewer_Selector2d () | |
| void | setContext (GLViewer_Context *glc) |
| Sets context from Viewer2d. | |
| 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) |
| void | lock (bool) |
| Sets lock status (enable/disable interavtive) | |
| void | setMinRectSize (const QSize &minSize) |
Static Public Member Functions | |
| static int | appendKey () |
| static void | setAppendKey (int k) |
Protected Attributes | |
| GLViewer_Context * | myGLContext |
| GLViewer_Viewer * | myViewer |
| bool | myLocked |
| QSize | myMinRectSize |
2D select manager for GLViewer
| GLViewer_Selector2d::GLViewer_Selector2d | ( | GLViewer_Viewer2d * | v2d, |
| GLViewer_Context * | glc | ||
| ) |
Constructor
| GLViewer_Selector2d::~GLViewer_Selector2d | ( | ) |
Destructor
| void GLViewer_Selector2d.setContext | ( | GLViewer_Context * | glc | ) |
| GLViewer_Context* GLViewer_Selector2d.getContext | ( | ) | const |
| void GLViewer_Selector2d::setHilightColor | ( | Quantity_NameOfColor | color | ) | [virtual] |
Changes hilight color of context
| color | - new hilight color |
Implements GLViewer_Selector.
References myGLContext, and GLViewer_Context.SetHighlightColor().
| void GLViewer_Selector2d::setSelectColor | ( | Quantity_NameOfColor | color | ) | [virtual] |
Changes selection color of context
| color | - new selection color |
Implements GLViewer_Selector.
References myGLContext, and GLViewer_Context.SetSelectionColor().
| void GLViewer_Selector2d::detect | ( | int | x, |
| int | y | ||
| ) | [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.
| void GLViewer_Selector2d::undetectAll | ( | ) | [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.
| void GLViewer_Selector2d::select | ( | bool | append = false | ) | [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().
| void GLViewer_Selector2d::select | ( | const QRect & | selRect, |
| bool | append = false |
||
| ) | [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().
| void GLViewer_Selector2d::unselectAll | ( | ) | [virtual] |
Unselects all objects
Implements GLViewer_Selector.
References GLViewer_Selector.myLocked, GLViewer_Selector.myViewer, numSelected(), and GLViewer_Selector.selSelectionCancel().
| int GLViewer_Selector2d::numSelected | ( | ) | const [virtual] |
Implements GLViewer_Selector.
References myGLContext, and GLViewer_Context.NbSelected().
| void GLViewer_Selector2d::checkSelection | ( | int | selBefore, |
| bool | append, | ||
| int | aStatus | ||
| ) | [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.
| void GLViewer_Selector::lock | ( | bool | locked | ) | [inherited] |
Locks / unlocks the selector. If locked, nothing can be selected regadless of the selection mode. [ public ]
References GLViewer_Selector.myLocked.
| void GLViewer_Selector::setMinRectSize | ( | const QSize & | minSize | ) | [inherited] |
Sets the min size of rectangle to treat it as a rectangle for multiple selection( sensitivity ). If a rectangle size is less than that min size, the right-bottom point of the rectangle will be used for single selection. The default min size is ( 1,1 ). [ public ]
References GLViewer_Selector.myMinRectSize.
| static int GLViewer_Selector.appendKey | ( | ) | [static, inherited] |
Sets/returns the key for appending selected objects ( SHIFT by default )
| static void GLViewer_Selector.setAppendKey | ( | int | k | ) | [static, inherited] |
References test_big_table.k.
| void GLViewer_Selector.selSelectionCancel | ( | ) | [signal, inherited] |
| void GLViewer_Selector.selSelectionDone | ( | bool | append, |
| SelectionChangeStatus | status | ||
| ) | [signal, inherited] |
GLViewer_Context* GLViewer_Selector2d.myGLContext [protected] |
GLViewer_Viewer* GLViewer_Selector.myViewer [protected, inherited] |
bool GLViewer_Selector.myLocked [protected, inherited] |
QSize GLViewer_Selector.myMinRectSize [protected, inherited] |