VR-Forces 4.1 Class Documentation
List of all members | 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]

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 

Constructor & Destructor Documentation

DtSymbolSelector::DtSymbolSelector ( )
virtual DtSymbolSelector::~DtSymbolSelector ( )
virtual
DtSymbolSelector::DtSymbolSelector ( const DtSymbolSelector orig)
private

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.

virtual DtSelectorType DtSymbolSelector::selectorType ( )
virtual

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.

virtual DtPoint DtSymbolSelector::firstEdgePoint ( )
virtual

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

virtual DtPoint DtSymbolSelector::secondEdgePoint ( )
virtual

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

virtual bool DtSymbolSelector::selectionInProgress ( )
virtual

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.

virtual void DtSymbolSelector::setRightClickMaintainsSelection ( bool  b)
virtual
virtual bool DtSymbolSelector::rightClickMaintainsSelection ( ) const
virtual
bool DtSymbolSelector::keepUnknownKeys ( ) const
inlinevirtual

Reimplemented in DtTerrainSelector.

virtual void DtSymbolSelector::startSelection ( const QPoint &  pnt)
virtualslot

Starts the selection process.

virtual void DtSymbolSelector::updateLocation ( const QPoint &  pnt)
virtualslot

Update selection with latest mouse location.

virtual void DtSymbolSelector::endSelection ( Qt::KeyboardModifiers  keyState,
Qt::MouseButtons  mouseState 
)
virtualslot

Ends the selection process.

Reimplemented in DtTerrainSelector.

virtual void DtSymbolSelector::drawRect ( QPainter *  paint)
protectedvirtual

Draws a rectangle based on selection points.

virtual void DtSymbolSelector::drawCircle ( QPainter *  paint)
protectedvirtual

Draws a circle based on selection points.

virtual void DtSymbolSelector::drawCirclePoints ( QPainter *  paint)
protectedvirtual

Draws circle points based on selection points.

virtual QPoint DtSymbolSelector::getWindowPoint ( const DtPoint p)
protectedvirtual

Update window point from database point.

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

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

Member Data Documentation

const DtTMViewportExtents* DtSymbolSelector::myViewportExtents
protected
DtViewDriver* DtSymbolSelector::myViewDriver
protected
bool DtSymbolSelector::mySelectionInProgress
protected
DtPoint DtSymbolSelector::myStartPoint
protected
DtPoint DtSymbolSelector::myEndPoint
protected
DtSelectorType DtSymbolSelector::mySelectorType
protected
int DtSymbolSelector::mySelectionMode
protected
QVector<DtModelKey> DtSymbolSelector::mySelectedModelKeys
protected
QVector<DtModelKey> DtSymbolSelector::myLastSelectedModelKeys
protected
bool DtSymbolSelector::myRightClickMaintainsSelection
protected

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)