Version: 6.3.1
Signals | Public Member Functions | Static Public Member Functions | Protected Attributes

GLViewer_Selector2d Class Reference

#include <GLViewer_Selector2d.h>

Inheritance diagram for GLViewer_Selector2d:
Inheritance graph

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_ContextgetContext () 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_ContextmyGLContext
GLViewer_ViewermyViewer
bool myLocked
QSize myMinRectSize

Detailed Description

2D select manager for GLViewer


Constructor & Destructor Documentation

GLViewer_Selector2d::GLViewer_Selector2d ( GLViewer_Viewer2d v2d,
GLViewer_Context glc 
)

Constructor

GLViewer_Selector2d::~GLViewer_Selector2d ( )

Destructor


Member Function Documentation

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

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

Parameters:
color- new selection color

Implements GLViewer_Selector.

References myGLContext, and GLViewer_Context.SetSelectionColor().

void GLViewer_Selector2d::detect ( int  x,
int  y 
) [virtual]
void GLViewer_Selector2d::undetectAll ( ) [virtual]
void GLViewer_Selector2d::select ( bool  append = false) [virtual]
void GLViewer_Selector2d::select ( const QRect &  selRect,
bool  append = false 
) [virtual]
void GLViewer_Selector2d::unselectAll ( ) [virtual]
int GLViewer_Selector2d::numSelected ( ) const [virtual]
Returns:
number of selected objects

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]

Field Documentation

bool GLViewer_Selector.myLocked [protected, inherited]
QSize GLViewer_Selector.myMinRectSize [protected, inherited]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS