VR-Forces 4.0.4 Class Documentation
Public Types | Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtSymbolSelector Class Reference

This class has been modified to be a pure interface to what a selector needs to implement in order to select objects on the screen. More...

Inheritance diagram for DtSymbolSelector:
Inheritance graph
[legend]

List of all members.

Public Types

enum  DtSelectorType {
  DtNone = 0, DtRectSelector, DtCircleSelector, DtCirclePointsSelector,
  DtCircleInscribedPointsSelector, DtSinglePointSelector, DtMAXSelectorType
}

Public Slots

virtual void startSelection (const QPoint &pnt)
 Starts the selection process.
virtual void updateLocation (const QPoint &pnt)
 Update selection with latest mouse location.
virtual void endSelection (Qt::KeyboardModifiers keyState, Qt::MouseButtons mouseState)
 Ends the selection process.

Public Member Functions

 DtSymbolSelector ()
virtual ~DtSymbolSelector ()
virtual void draw (QPainter *dc)
 Draws the rubber band onto the DC.
virtual void setSelectorType (DtSelectorType type)
 Sets current selector type.
virtual DtSelectorType selectorType ()
 Returns current selector type.
virtual QPoint firstEdgeWindowPoint ()
 Returns first edge point (DtCircleSelector), or start point.
virtual QPoint secondEdgeWindowPoint ()
 Returns second edge point (DtCircleSelector), or end point.
virtual DtPoint firstEdgePoint ()
 Returns first edge point (DtCircleSelector), or start point.
virtual DtPoint secondEdgePoint ()
 Returns second edge point (DtCircleSelector), or end point.
virtual bool selectionInProgress ()
 Returns true if startSelection() has been called.
virtual void setViewportExtents (const DtTMViewportExtents *v)
 Sets the viewport extents.
virtual void setViewDriver (DtViewDriver *v)
 Sets the view driver.
virtual QVector< DtModelKey > & selectedModelKeys ()
 Returns list of current symbol data.
virtual void setSelectionMode (int mode)
 Accessors for selection mode.
virtual int selectionMode () const
virtual void clear ()
 Clears out any internal state.
virtual void selectSymbols (DtModelDataIter *iter, Qt::KeyboardModifiers keyState, Qt::MouseButtons mouseState)=0
 Selects symbols based upon current selector type.
virtual void highlightSymbols (QVector< DtModelKey > *display=NULL)=0
 Highlights any currently selected symbols.
virtual void highlightNoSymbols ()
virtual void remove (const DtModelKey &key)
 Removes a model key from the selected list.
virtual void setSelectedKeys (const QVector< DtModelKey > &keys)
 Sets the selected keys to the specified list.
virtual void setRightClickMaintainsSelection (bool b)
virtual bool rightClickMaintainsSelection () const
virtual bool keepUnknownKeys () const

Protected Member Functions

virtual void drawRect (QPainter *paint)
 Draws a rectangle based on selection points.
virtual void drawCircle (QPainter *paint)
 Draws a circle based on selection points.
virtual void drawCirclePoints (QPainter *paint)
 Draws circle points based on selection points.
virtual QPoint getWindowPoint (const DtPoint &p)
 Update window point from database point.
virtual void merge (const QVector< DtModelKey > &keys, QVector< DtModelKey > &result)
 Merge the model keys specified in keys into result by adding new keys and removing keys that are common.

Protected Attributes

const DtTMViewportExtentsmyViewportExtents
DtViewDrivermyViewDriver
bool mySelectionInProgress
DtPoint myStartPoint
DtPoint myEndPoint
DtSelectorType mySelectorType
int mySelectionMode
QVector< DtModelKeymySelectedModelKeys
QVector< DtModelKeymyLastSelectedModelKeys
bool myRightClickMaintainsSelection

Private Member Functions

 DtSymbolSelector (const DtSymbolSelector &orig)
 Copy constructor.
DtSymbolSelectoroperator= (const DtSymbolSelector &orig)
 Assignment operator.

Detailed Description

This class has been modified to be a pure interface to what a selector needs to implement in order to select objects on the screen.

This was abstracted to allow a terrain selector to be created


Member Enumeration Documentation

Enumerator:
DtNone 

No selection

DtRectSelector 

Rectangle selection

DtCircleSelector 

Circle Selection (Center Point + radius)

DtCirclePointsSelector 

Circle Selection (Two edge points

DtCircleInscribedPointsSelector 

DtCirclePointsSelector with center rect

DtSinglePointSelector 

Single Point Selection selection

DtMAXSelectorType 

Reimplemented in DtObjectSelector.


Constructor & Destructor Documentation

virtual DtSymbolSelector::~DtSymbolSelector ( ) [virtual]

Copy constructor.


Member Function Documentation

DtSymbolSelector& DtSymbolSelector::operator= ( const DtSymbolSelector orig) [private]

Assignment operator.

virtual void DtSymbolSelector::draw ( QPainter *  dc) [virtual]

Draws the rubber band onto the DC.

virtual void DtSymbolSelector::setSelectorType ( DtSelectorType  type) [virtual]

Sets current selector type.

Returns current selector type.

virtual QPoint DtSymbolSelector::firstEdgeWindowPoint ( ) [virtual]

Returns first edge point (DtCircleSelector), or start point.

virtual QPoint DtSymbolSelector::secondEdgeWindowPoint ( ) [virtual]

Returns second edge point (DtCircleSelector), or end point.

Returns first edge point (DtCircleSelector), or start point.

Returns second edge point (DtCircleSelector), or end point.

Returns true if startSelection() has been called.

virtual void DtSymbolSelector::setViewportExtents ( const DtTMViewportExtents v) [virtual]

Sets the viewport extents.

virtual void DtSymbolSelector::setViewDriver ( DtViewDriver v) [virtual]

Sets the view driver.

virtual QVector<DtModelKey>& DtSymbolSelector::selectedModelKeys ( ) [virtual]

Returns list of current symbol data.

virtual void DtSymbolSelector::setSelectionMode ( int  mode) [virtual]

Accessors for selection mode.

These will be used by the validation routine to figure out whether or not the selection is valid. All subclasses should override the validation routine to set their selection validation routines

virtual int DtSymbolSelector::selectionMode ( ) const [virtual]
virtual void DtSymbolSelector::clear ( ) [virtual]

Clears out any internal state.

Reimplemented in DtTerrainSelector.

virtual void DtSymbolSelector::selectSymbols ( DtModelDataIter iter,
Qt::KeyboardModifiers  keyState,
Qt::MouseButtons  mouseState 
) [pure virtual]

Selects symbols based upon current selector type.

Implemented in DtTerrainSelector, and DtObjectSelector.

virtual void DtSymbolSelector::highlightSymbols ( QVector< DtModelKey > *  display = NULL) [pure virtual]

Highlights any currently selected symbols.

Implemented in DtTerrainSelector, and DtObjectSelector.

virtual void DtSymbolSelector::highlightNoSymbols ( ) [virtual]
virtual void DtSymbolSelector::remove ( const DtModelKey key) [virtual]

Removes a model key from the selected list.

virtual void DtSymbolSelector::setSelectedKeys ( const QVector< DtModelKey > &  keys) [virtual]

Sets the selected keys to the specified list.

bool DtSymbolSelector::keepUnknownKeys ( ) const [inline, virtual]

Reimplemented in DtTerrainSelector.

virtual void DtSymbolSelector::startSelection ( const QPoint &  pnt) [virtual, slot]

Starts the selection process.

virtual void DtSymbolSelector::updateLocation ( const QPoint &  pnt) [virtual, slot]

Update selection with latest mouse location.

virtual void DtSymbolSelector::endSelection ( Qt::KeyboardModifiers  keyState,
Qt::MouseButtons  mouseState 
) [virtual, slot]

Ends the selection process.

Reimplemented in DtTerrainSelector.

virtual void DtSymbolSelector::drawRect ( QPainter *  paint) [protected, virtual]

Draws a rectangle based on selection points.

virtual void DtSymbolSelector::drawCircle ( QPainter *  paint) [protected, virtual]

Draws a circle based on selection points.

virtual void DtSymbolSelector::drawCirclePoints ( QPainter *  paint) [protected, virtual]

Draws circle points based on selection points.

virtual QPoint DtSymbolSelector::getWindowPoint ( const DtPoint p) [protected, virtual]

Update window point from database point.

virtual void DtSymbolSelector::merge ( const QVector< DtModelKey > &  keys,
QVector< DtModelKey > &  result 
) [protected, virtual]

Merge the model keys specified in keys into result by adding new keys and removing keys that are common.


Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)