![]() |
VR-Forces 4.0.4 Class Documentation
|
contains a number of different formulas to select items from a given point More...

Public Types | |
| enum | DtSelectorType { DtNone = 0, DtRectSelector, DtCircleSelector, DtCirclePointsSelector, DtCircleInscribedPointsSelector, DtSinglePointSelector, DtMAXSelectorType } |
Public Member Functions | |
| DtObjectSelector () | |
| Default constructor. | |
| virtual | ~DtObjectSelector () |
| Destructor. | |
| virtual void | selectSymbols (DtModelDataIter *iter, Qt::KeyboardModifiers keyState, Qt::MouseButtons mouseState) |
| Selects symbols based upon current selector type. | |
| virtual void | setSelectionFilter (const DtFilter &) |
| Set filter to filter objects that can be selected. | |
| virtual const DtFilter * | selectionFilter () const |
| virtual void | revalidateSelectedKeys (DtModelDataIter *iter) |
| Revalidates current selected keys against the current filter. | |
| virtual void | clearFilter () |
| Clears out filter and sets selection mode to normal. | |
| virtual DtSymbol * | symbolAtLocation (DtModelDataIter *iter, const DtPoint &pnt) |
| Given the database location, return the symbol at the specified location. | |
| virtual void | backupSelectionFilter () |
| Backs-up/restores backed up selection filter. | |
| virtual bool | restoreSelectionFilter () |
Static Public Member Functions | |
| static DtObjectSelector * | create () |
| Static creator function. | |
Protected Member Functions | |
| virtual bool | isValidForSelectionMode (const DtModelData *data) |
| Returns true if this model data is valid for the specified selection mode. | |
| virtual bool | isValidForSelectionMode (const DtSymbol *symbol) |
| Returns true if this symbol is valid for the specified selection mode. | |
| virtual bool | isValidForMode (const DtModelData *data, const DtSymbol *s) |
| Calls either selection mode validators depending on how flags are set. | |
| virtual void | select (DtModelDataIter *iter, QVector< DtModelKey > &keys, Qt::KeyboardModifiers keyState, Qt::MouseButtons mouseState) |
| Selects symbols by using appropriate selection mode. | |
| virtual bool | isInRectangle (const DtModelData *data, DtSymbol *s, const QPoint &start, const QPoint &end) const |
| Different selection modes. | |
| virtual bool | isInPoint (const DtModelData *data, DtSymbol *s, const QPoint &start, const QPoint &end) const |
| virtual bool | isInCircle (const DtModelData *data, DtSymbol *s, const QPoint &start, const QPoint &end) const |
| virtual bool | isInRectCircle (const DtModelData *data, DtSymbol *s, const QPoint &start, const QPoint &end) const |
| virtual bool | selectForMode (const DtModelData *data, DtSymbol *s, const QPoint &start, const QPoint &end) const |
| Given the selection mode, sees if the symbol can be selected. | |
| virtual void | postProcessForMode (DtModelDataIter *iter, const QPoint &start, const QPoint &end, QVector< DtModelKey > &keys) |
| Does any final processing for selection mode. | |
| virtual void | postProcessRectangleMode (DtModelDataIter *iter, const QPoint &start, const QPoint &end, QVector< DtModelKey > &keys) |
| virtual void | highlightSymbols (QVector< DtModelKey > *display=NULL) |
| Highlights all symbols in symbol list. | |
| virtual bool | passesFinalSelectionTest (const DtSymbol *s) |
| virtual void | removeSingleSelectionItems (DtModelDataIter *iter, QVector< DtModelKey > &) |
| Given a list, removes any item that is a "single selection" item. | |
| virtual bool | isSingleSelectionItem (DtModelData *data, DtSymbol *s) const |
Protected Attributes | |
| DtFilter * | mySelectionFilter |
| DtPtrQList< DtFilter * > | myFilterBackups |
Private Member Functions | |
| DtObjectSelector (const DtObjectSelector &orig) | |
| Copy constructor. | |
| DtObjectSelector & | operator= (const DtObjectSelector &orig) |
| Assignment operator. | |
contains a number of different formulas to select items from a given point
Reimplemented from DtSymbolSelector.
Default constructor.
| virtual DtObjectSelector::~DtObjectSelector | ( | ) | [virtual] |
Destructor.
| DtObjectSelector::DtObjectSelector | ( | const DtObjectSelector & | orig | ) | [private] |
Copy constructor.
| virtual void DtObjectSelector::selectSymbols | ( | DtModelDataIter * | iter, |
| Qt::KeyboardModifiers | keyState, | ||
| Qt::MouseButtons | mouseState | ||
| ) | [virtual] |
Selects symbols based upon current selector type.
Implements DtSymbolSelector.
| static DtObjectSelector* DtObjectSelector::create | ( | ) | [static] |
Static creator function.
| virtual void DtObjectSelector::setSelectionFilter | ( | const DtFilter & | ) | [virtual] |
Set filter to filter objects that can be selected.
If filter is NULL, all objects can be selected. Note that when filter is passed in it will be cloned for use by this object. When the filter is set, it also sets selection mode to use that filter
| virtual const DtFilter* DtObjectSelector::selectionFilter | ( | ) | const [virtual] |
| virtual void DtObjectSelector::revalidateSelectedKeys | ( | DtModelDataIter * | iter | ) | [virtual] |
Revalidates current selected keys against the current filter.
| virtual void DtObjectSelector::clearFilter | ( | ) | [virtual] |
Clears out filter and sets selection mode to normal.
| virtual DtSymbol* DtObjectSelector::symbolAtLocation | ( | DtModelDataIter * | iter, |
| const DtPoint & | pnt | ||
| ) | [virtual] |
Given the database location, return the symbol at the specified location.
Will return the first symbol found
| virtual void DtObjectSelector::backupSelectionFilter | ( | ) | [virtual] |
Backs-up/restores backed up selection filter.
This is a push/pop mechanism, so, it can be backed up multiple types
| virtual bool DtObjectSelector::restoreSelectionFilter | ( | ) | [virtual] |
| DtObjectSelector& DtObjectSelector::operator= | ( | const DtObjectSelector & | orig | ) | [private] |
Assignment operator.
| virtual bool DtObjectSelector::isValidForSelectionMode | ( | const DtModelData * | data | ) | [protected, virtual] |
Returns true if this model data is valid for the specified selection mode.
| virtual bool DtObjectSelector::isValidForSelectionMode | ( | const DtSymbol * | symbol | ) | [protected, virtual] |
Returns true if this symbol is valid for the specified selection mode.
| virtual bool DtObjectSelector::isValidForMode | ( | const DtModelData * | data, |
| const DtSymbol * | s | ||
| ) | [protected, virtual] |
Calls either selection mode validators depending on how flags are set.
Can be overridden to provide additional selection functionality
| virtual void DtObjectSelector::select | ( | DtModelDataIter * | iter, |
| QVector< DtModelKey > & | keys, | ||
| Qt::KeyboardModifiers | keyState, | ||
| Qt::MouseButtons | mouseState | ||
| ) | [protected, virtual] |
Selects symbols by using appropriate selection mode.
| virtual bool DtObjectSelector::isInRectangle | ( | const DtModelData * | data, |
| DtSymbol * | s, | ||
| const QPoint & | start, | ||
| const QPoint & | end | ||
| ) | const [protected, virtual] |
Different selection modes.
| virtual bool DtObjectSelector::isInPoint | ( | const DtModelData * | data, |
| DtSymbol * | s, | ||
| const QPoint & | start, | ||
| const QPoint & | end | ||
| ) | const [protected, virtual] |
| virtual bool DtObjectSelector::isInCircle | ( | const DtModelData * | data, |
| DtSymbol * | s, | ||
| const QPoint & | start, | ||
| const QPoint & | end | ||
| ) | const [protected, virtual] |
| virtual bool DtObjectSelector::isInRectCircle | ( | const DtModelData * | data, |
| DtSymbol * | s, | ||
| const QPoint & | start, | ||
| const QPoint & | end | ||
| ) | const [protected, virtual] |
| virtual bool DtObjectSelector::selectForMode | ( | const DtModelData * | data, |
| DtSymbol * | s, | ||
| const QPoint & | start, | ||
| const QPoint & | end | ||
| ) | const [protected, virtual] |
Given the selection mode, sees if the symbol can be selected.
| virtual void DtObjectSelector::postProcessForMode | ( | DtModelDataIter * | iter, |
| const QPoint & | start, | ||
| const QPoint & | end, | ||
| QVector< DtModelKey > & | keys | ||
| ) | [protected, virtual] |
Does any final processing for selection mode.
Currently only works with rect selection mode if rectangle is small (less than 2 pixels on width and height) to find closest selection
| virtual void DtObjectSelector::postProcessRectangleMode | ( | DtModelDataIter * | iter, |
| const QPoint & | start, | ||
| const QPoint & | end, | ||
| QVector< DtModelKey > & | keys | ||
| ) | [protected, virtual] |
| virtual void DtObjectSelector::highlightSymbols | ( | QVector< DtModelKey > * | display = NULL | ) | [protected, virtual] |
Highlights all symbols in symbol list.
Implements DtSymbolSelector.
| virtual bool DtObjectSelector::passesFinalSelectionTest | ( | const DtSymbol * | s | ) | [protected, virtual] |
| virtual void DtObjectSelector::removeSingleSelectionItems | ( | DtModelDataIter * | iter, |
| QVector< DtModelKey > & | |||
| ) | [protected, virtual] |
Given a list, removes any item that is a "single selection" item.
Currently this is just lines with a point selected
| virtual bool DtObjectSelector::isSingleSelectionItem | ( | DtModelData * | data, |
| DtSymbol * | s | ||
| ) | const [protected, virtual] |
DtFilter* DtObjectSelector::mySelectionFilter [protected] |
DtPtrQList<DtFilter*> DtObjectSelector::myFilterBackups [protected] |