![]() |
VR-Forces 4.0.4 Class Documentation
|
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...

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 DtTMViewportExtents * | myViewportExtents |
| DtViewDriver * | myViewDriver |
| bool | mySelectionInProgress |
| DtPoint | myStartPoint |
| DtPoint | myEndPoint |
| DtSelectorType | mySelectorType |
| int | mySelectionMode |
| QVector< DtModelKey > | mySelectedModelKeys |
| QVector< DtModelKey > | myLastSelectedModelKeys |
| bool | myRightClickMaintainsSelection |
Private Member Functions | |
| DtSymbolSelector (const DtSymbolSelector &orig) | |
| Copy constructor. | |
| DtSymbolSelector & | operator= (const DtSymbolSelector &orig) |
| Assignment operator. | |
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
Reimplemented in DtObjectSelector.
| virtual DtSymbolSelector::~DtSymbolSelector | ( | ) | [virtual] |
| DtSymbolSelector::DtSymbolSelector | ( | const DtSymbolSelector & | orig | ) | [private] |
Copy constructor.
| 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 [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.
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] |