VR-Forces 4.0.4 Class Documentation
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtTMMapArea Class Reference

DtTMMapArea is a class used for drawing and navigation of terrain. More...

Inheritance diagram for DtTMMapArea:
Inheritance graph
[legend]

List of all members.

Public Slots

virtual void zoomIn ()
 Zooms in tdb view, emits tdbViewChanged, and updates.
virtual void zoomOut ()
 Zooms out tdb view, emits tdbViewChanged, and updates.
virtual void drawRubberBands (QPainter *p)
virtual void clearSelection (bool signal=true)
virtual void changeSelection (const QVector< DtModelKey > &d)
virtual bool addSelection (const QVector< DtModelKey > &d)
 Adds these keys to the selection list if they are not there already.
virtual bool removeSelection (const QVector< DtModelKey > &d)
 Removes these keys from the selection list if they are in it.
virtual void setRightClickMaintainSelection (bool b)
virtual bool rightClickMaintainSelection ()
virtual void forcePersistentSymbol (DtSymbol *s)
virtual void stopForcePersistentSymbol (DtSymbol *s)
virtual void catchViewportChange (const DtTMViewportExtents *v)
virtual bool dragStart ()
 Called when a drag/drop operation is about to start.
virtual void dragComplete ()
 Called when a drag/drop operation is complete, regardless of the success of the operation.
virtual void setFreezeSelection (bool)
 Sets whether or not to freeze current selection regardless of any type of change made.
bool freezeSelection () const

Signals

void leftDoubleClick ()
void symbolsSelected (DtSymbolList *)
void selectionChanged (const QVector< DtModelKey > &)
void selectionUpdated (const QVector< DtModelKey > &)
void databasePointSelected (const DtPoint &)
void nullSelected ()
void rightMouseContext (DtSymbolList *, QPoint)
void middleMouseContext (DtSymbolList *, QPoint)
void mouseSignal (QMouseEvent *, const DtPoint &)
 Sent whenever a mouse event happens.
void keyboardSignal (QKeyEvent *)
 Sent whenever a key event happens.
void focusEventSignal (QEvent *)
 Sent whenever a you leave the focus area.
void enterEventSignal (QEvent *)
void leaveEventSignal (QEvent *)
void activateMap (DtTMMapArea *)
void dropEventSignal (QDropEvent *)
void dragEnterEventSignal (QDragEnterEvent *)
void dragLeaveEventSignal (QDragLeaveEvent *)
void dragMoveEventSignal (QDragMoveEvent *)
void selectionInProgress (DtSymbolSelector &symbolSelector)
 Sent whenever a selection is in process (i.e. before mouse is released)
void selectedModelDataUpdated ()
 Sent whenever the selected model data is updated.
void aboutToDraw (QPainter *map)
 Sent when the lens area is about to draw.
void selectionModeChanged (int iNewMode)
 Sent when the selection mode has changed.
void frozenChanged (bool)
 Emitted when frozen selection changes.

Public Member Functions

 DtTMMapArea (QWidget *parent=0, const Qt::WindowFlags &flags=0)
virtual ~DtTMMapArea ()
virtual bool init (const DtTMFactory *f)
 Initializer. MUST BE CALLED.
virtual void setSelectorType (DtSymbolSelector::DtSelectorType type)
virtual DtSymbolSelectorsymbolSelector ()
virtual DtSymbolListselectedSymbols ()
virtual const QVector
< DtModelKey > & 
selectedModelKeys () const
 Returns mySelectedModelKeys.
virtual QVector< DtModelKey > & selectedModelKeys ()
virtual bool leftButtonClicked ()
virtual double getDatabaseHeight (double x, double y) const
virtual bool tick ()
 Check to see if need to draw order.
virtual void setActivateMap ()
 Activate the map.
virtual void updateSelectedModelData ()
virtual void setResetLabelPositions (bool b)
 Signal to tell the symbol updater to reset label positions (or not) on next tick.
virtual void clear ()
 Clears out selected symbols and drawn symbols.
virtual void removeFromPersistentData (const QString &key)
virtual void applyOptions (DtSymbol *s)
 This routine will ask the symbol updater to apply the options for the supplied symbol.
DtObjectSelectorobjectSelector ()
virtual bool startNullSelectionMode (bool showHandCursor=false)
 Routines that will allow certain valid selections on the map area Start null selection mode.
virtual bool startNormalSelectionMode ()
 Start normal selection mode.
virtual bool startSymbolPointSelectionMode (int selectionMode, bool showHandCursor=false, bool reset=false, bool backup=true, bool force=false)
virtual bool startSymbolRectangleSelectionMode (int selectionMode, bool showHandCursor=false, bool reset=false, bool backup=true, bool force=false)
virtual bool startSelectionMode (int selectionMode, DtSymbolSelector::DtSelectorType type, bool showHandCursor=false, bool reset=false, bool backup=true, bool force=false)
 General selection function.
virtual void swapModelKeys (QVector< DtModelKey > &orig, QVector< DtModelKey > &save, QVector< DtModelKey > &display)
virtual int symbolSelectionMode () const
const DtPointlastSelectedPoint () const
virtual void removeSymbol (const DtModelData &data, bool force)
 Removes the symbol from the map area and from any internal selected lists.
virtual DtSymbolSelectorsetCurrentSelector (DtSymbolSelector *s)
 Returns the current symbol selector after setting to new selector.
virtual DtSymbolSelectorcurrentSelector ()
virtual void setObjectSelectionMode (const DtFilter *f=NULL, bool swapKeys=false)
 Selection modes.
virtual bool inObjectSelectionMode () const
 Returns true if this area is in object selection mode.
virtual DtSymbolsymbolAtLocation (const DtPoint &pnt) const
 Asks the object selector (if it exists) to return the symbol at the specified database location.
virtual bool event (QEvent *)
 Only exposed for public access.

Static Public Member Functions

static DtTMMapAreacreate (QWidget *parent, const Qt::WindowFlags &flags)
 Returns a newly created instance of a DtTMMapArea.

Protected Member Functions

virtual void setViewportExtents (const DtTMViewportExtents *v)
virtual void modifySymbol (const DtModelData &data)
virtual bool initViewDriver (const DtTMFactory *f)
virtual bool initObjectSelector (const DtTMFactory *f)
virtual void updateSymbolSelection (Qt::KeyboardModifiers keyState, Qt::MouseButtons mouseState, bool updateInternalSelection=true)
virtual void updateSelectedSymbols (const QVector< DtModelKey > &selectedKeys)
virtual void updatePersistentModelData ()
virtual void highlightNoSymbols ()
virtual void highlightSymbols (QVector< DtModelKey > *display=NULL)
virtual void mousePressEvent (QMouseEvent *e)
 Event overloads.
virtual void mouseReleaseEvent (QMouseEvent *e)
virtual void mouseMoveEvent (QMouseEvent *e)
virtual void mouseDoubleClickEvent (QMouseEvent *e)
virtual void keyPressEvent (QKeyEvent *e)
virtual void keyReleaseEvent (QKeyEvent *e)
virtual void wheelEvent (QWheelEvent *e)
virtual void focusOutEvent (QFocusEvent *e)
virtual void leaveEvent (QEvent *e)
virtual void enterEvent (QEvent *e)
virtual void mouseSelect (QMouseEvent *e)
virtual void mousePressSelect (QMouseEvent *e)
virtual void dragEnterEvent (QDragEnterEvent *e)
 Drag/Drop code.
virtual void dragLeaveEvent (QDragLeaveEvent *e)
virtual void dragMoveEvent (QDragMoveEvent *e)
virtual void dropEvent (QDropEvent *e)

Protected Attributes

DtObjectSelectormyObjectSelector
DtSymbolSelectormyCurrentSelector
QVector< DtModelKeymyTemporarySelectedModelData
QVector< DtModelKeymySelectedModelKeys
QStringList myPersistentModelData
DtSymbolList myForcedPersistentModelData
DtSymbolList mySelectedSymbols
QPoint myMouseBegin
QPoint myMouseLast
DtPointmyLastSelectedPoint
bool myIsActivated
bool myRightClickMaintainSelection
Qt::MouseButtons myButtonState
Qt::KeyboardModifiers myKeyState
bool mySingleSelection
bool myFreezeSelection
int myKeyPressed

Private Member Functions

 DtTMMapArea (const DtTMMapArea &orig)
 Not implemented.
DtTMMapAreaoperator= (const DtTMMapArea &rhs)
 Not implemented.

Detailed Description

DtTMMapArea is a class used for drawing and navigation of terrain.

Slots are provided for navigation calls, and all of them currently result in a redraw of the terrain. This class must be initialized with the proper drawers. DtPixmapTerrain provides the drawing functionality, while DtTdbView provides the navigation.


Constructor & Destructor Documentation

DtTMMapArea::DtTMMapArea ( QWidget parent = 0,
const Qt::WindowFlags &  flags = 0 
)
virtual DtTMMapArea::~DtTMMapArea ( ) [virtual]
DtTMMapArea::DtTMMapArea ( const DtTMMapArea orig) [private]

Not implemented.


Member Function Documentation

virtual bool DtTMMapArea::init ( const DtTMFactory f) [virtual]

Initializer. MUST BE CALLED.

Reimplemented from DtTMArea.

Reimplemented in DtTerrainMapArea.

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

Returns mySelectedModelKeys.

To see what is currently selected in the system selector, get the symbol selector via symbolSelector() and check the symbol selectors selected symbols

virtual QVector<DtModelKey>& DtTMMapArea::selectedModelKeys ( ) [virtual]
virtual bool DtTMMapArea::leftButtonClicked ( ) [virtual]
virtual double DtTMMapArea::getDatabaseHeight ( double  x,
double  y 
) const [virtual]

Reimplemented in DtTerrainMapArea.

virtual bool DtTMMapArea::tick ( ) [virtual]

Check to see if need to draw order.

Reimplemented from DtTMArea.

virtual void DtTMMapArea::setActivateMap ( ) [virtual]

Activate the map.

virtual void DtTMMapArea::updateSelectedModelData ( ) [virtual]
virtual void DtTMMapArea::setResetLabelPositions ( bool  b) [virtual]

Signal to tell the symbol updater to reset label positions (or not) on next tick.

virtual void DtTMMapArea::clear ( ) [virtual]

Clears out selected symbols and drawn symbols.

Reimplemented from DtTMArea.

virtual void DtTMMapArea::removeFromPersistentData ( const QString &  key) [virtual]
virtual void DtTMMapArea::applyOptions ( DtSymbol s) [virtual]

This routine will ask the symbol updater to apply the options for the supplied symbol.

References myObjectSelector.

static DtTMMapArea* DtTMMapArea::create ( QWidget parent,
const Qt::WindowFlags &  flags 
) [static]

Returns a newly created instance of a DtTMMapArea.

Reimplemented in DtTerrainMapArea.

virtual bool DtTMMapArea::startNullSelectionMode ( bool  showHandCursor = false) [virtual]

Routines that will allow certain valid selections on the map area Start null selection mode.

if showHandCursor is true, will display the hand cursor on screen

Start normal selection mode.

virtual bool DtTMMapArea::startSymbolPointSelectionMode ( int  selectionMode,
bool  showHandCursor = false,
bool  reset = false,
bool  backup = true,
bool  force = false 
) [virtual]
virtual bool DtTMMapArea::startSymbolRectangleSelectionMode ( int  selectionMode,
bool  showHandCursor = false,
bool  reset = false,
bool  backup = true,
bool  force = false 
) [virtual]
virtual bool DtTMMapArea::startSelectionMode ( int  selectionMode,
DtSymbolSelector::DtSelectorType  type,
bool  showHandCursor = false,
bool  reset = false,
bool  backup = true,
bool  force = false 
) [virtual]

General selection function.

use this if you need a selection mode not defined by any of the above functions.

virtual void DtTMMapArea::swapModelKeys ( QVector< DtModelKey > &  orig,
QVector< DtModelKey > &  save,
QVector< DtModelKey > &  display 
) [virtual]
virtual int DtTMMapArea::symbolSelectionMode ( ) const [virtual]
virtual void DtTMMapArea::removeSymbol ( const DtModelData data,
bool  force 
) [virtual]

Removes the symbol from the map area and from any internal selected lists.

Reimplemented from DtTMArea.

Returns the current symbol selector after setting to new selector.

virtual void DtTMMapArea::setObjectSelectionMode ( const DtFilter f = NULL,
bool  swapKeys = false 
) [virtual]

Selection modes.

If Filter is NULL, selects all objects. If swapKeys is true, moves current selection to the temporary backup before revalidating due to filter. To restore the selection, setNormalSelectionMode()

virtual bool DtTMMapArea::inObjectSelectionMode ( ) const [virtual]

Returns true if this area is in object selection mode.

virtual DtSymbol* DtTMMapArea::symbolAtLocation ( const DtPoint pnt) const [virtual]

Asks the object selector (if it exists) to return the symbol at the specified database location.

virtual bool DtTMMapArea::event ( QEvent *  ) [virtual]

Only exposed for public access.

void DtTMMapArea::leftDoubleClick ( ) [signal]
void DtTMMapArea::selectionChanged ( const QVector< DtModelKey > &  ) [signal]
void DtTMMapArea::selectionUpdated ( const QVector< DtModelKey > &  ) [signal]
void DtTMMapArea::databasePointSelected ( const DtPoint ) [signal]
void DtTMMapArea::nullSelected ( ) [signal]
void DtTMMapArea::rightMouseContext ( DtSymbolList ,
QPoint   
) [signal]

Reimplemented in DtFormationEditor.

void DtTMMapArea::middleMouseContext ( DtSymbolList ,
QPoint   
) [signal]
void DtTMMapArea::mouseSignal ( QMouseEvent *  ,
const DtPoint  
) [signal]

Sent whenever a mouse event happens.

This is useful for event handling The Point is the mouse location in DATABASE coordinates

void DtTMMapArea::keyboardSignal ( QKeyEvent *  ) [signal]

Sent whenever a key event happens.

This is useful for event handling

void DtTMMapArea::focusEventSignal ( QEvent *  ) [signal]

Sent whenever a you leave the focus area.

this allows us to reset some things if necessary

void DtTMMapArea::enterEventSignal ( QEvent *  ) [signal]
void DtTMMapArea::leaveEventSignal ( QEvent *  ) [signal]
void DtTMMapArea::activateMap ( DtTMMapArea ) [signal]
void DtTMMapArea::dropEventSignal ( QDropEvent *  ) [signal]
void DtTMMapArea::dragEnterEventSignal ( QDragEnterEvent *  ) [signal]
void DtTMMapArea::dragLeaveEventSignal ( QDragLeaveEvent *  ) [signal]
void DtTMMapArea::dragMoveEventSignal ( QDragMoveEvent *  ) [signal]
void DtTMMapArea::selectionInProgress ( DtSymbolSelector symbolSelector) [signal]

Sent whenever a selection is in process (i.e. before mouse is released)

Sent whenever the selected model data is updated.

void DtTMMapArea::aboutToDraw ( QPainter *  map) [signal]

Sent when the lens area is about to draw.

void DtTMMapArea::selectionModeChanged ( int  iNewMode) [signal]

Sent when the selection mode has changed.

void DtTMMapArea::frozenChanged ( bool  ) [signal]

Emitted when frozen selection changes.

virtual void DtTMMapArea::zoomIn ( ) [virtual, slot]

Zooms in tdb view, emits tdbViewChanged, and updates.

Reimplemented in DtFormationEditor.

virtual void DtTMMapArea::zoomOut ( ) [virtual, slot]

Zooms out tdb view, emits tdbViewChanged, and updates.

Reimplemented in DtFormationEditor.

virtual void DtTMMapArea::drawRubberBands ( QPainter *  p) [virtual, slot]
virtual void DtTMMapArea::clearSelection ( bool  signal = true) [virtual, slot]
virtual void DtTMMapArea::changeSelection ( const QVector< DtModelKey > &  d) [virtual, slot]
virtual bool DtTMMapArea::addSelection ( const QVector< DtModelKey > &  d) [virtual, slot]

Adds these keys to the selection list if they are not there already.

Returns true if any changes were made.

virtual bool DtTMMapArea::removeSelection ( const QVector< DtModelKey > &  d) [virtual, slot]

Removes these keys from the selection list if they are in it.

Returns true if any changes were made.

virtual void DtTMMapArea::setRightClickMaintainSelection ( bool  b) [virtual, slot]
virtual bool DtTMMapArea::rightClickMaintainSelection ( ) [virtual, slot]
virtual void DtTMMapArea::forcePersistentSymbol ( DtSymbol s) [virtual, slot]
virtual void DtTMMapArea::stopForcePersistentSymbol ( DtSymbol s) [virtual, slot]
virtual void DtTMMapArea::catchViewportChange ( const DtTMViewportExtents v) [virtual, slot]

Reimplemented from DtTMArea.

virtual bool DtTMMapArea::dragStart ( ) [virtual, slot]

Called when a drag/drop operation is about to start.

Return false to abort the drag/drop operation

virtual void DtTMMapArea::dragComplete ( ) [virtual, slot]

Called when a drag/drop operation is complete, regardless of the success of the operation.

virtual void DtTMMapArea::setFreezeSelection ( bool  ) [virtual, slot]

Sets whether or not to freeze current selection regardless of any type of change made.

Note that the selection will be unfrozen when starting normal selection mode. If the selection is frozen, even if there are items selected, the current database point will be emitted

bool DtTMMapArea::freezeSelection ( ) const [inline, slot]

References myFreezeSelection.

virtual void DtTMMapArea::setViewportExtents ( const DtTMViewportExtents v) [protected, virtual]

Reimplemented from DtTMArea.

virtual void DtTMMapArea::modifySymbol ( const DtModelData data) [protected, virtual]

Reimplemented from DtTMArea.

DtTMMapArea& DtTMMapArea::operator= ( const DtTMMapArea rhs) [private]

Not implemented.

virtual bool DtTMMapArea::initViewDriver ( const DtTMFactory f) [protected, virtual]

Reimplemented from DtTMArea.

virtual bool DtTMMapArea::initObjectSelector ( const DtTMFactory f) [protected, virtual]
virtual void DtTMMapArea::updateSymbolSelection ( Qt::KeyboardModifiers  keyState,
Qt::MouseButtons  mouseState,
bool  updateInternalSelection = true 
) [protected, virtual]
virtual void DtTMMapArea::updateSelectedSymbols ( const QVector< DtModelKey > &  selectedKeys) [protected, virtual]
virtual void DtTMMapArea::updatePersistentModelData ( ) [protected, virtual]
virtual void DtTMMapArea::highlightNoSymbols ( ) [protected, virtual]
virtual void DtTMMapArea::highlightSymbols ( QVector< DtModelKey > *  display = NULL) [protected, virtual]
virtual void DtTMMapArea::mousePressEvent ( QMouseEvent *  e) [protected, virtual]

Event overloads.

virtual void DtTMMapArea::mouseReleaseEvent ( QMouseEvent *  e) [protected, virtual]
virtual void DtTMMapArea::mouseMoveEvent ( QMouseEvent *  e) [protected, virtual]
virtual void DtTMMapArea::mouseDoubleClickEvent ( QMouseEvent *  e) [protected, virtual]
virtual void DtTMMapArea::keyPressEvent ( QKeyEvent *  e) [protected, virtual]
virtual void DtTMMapArea::keyReleaseEvent ( QKeyEvent *  e) [protected, virtual]
virtual void DtTMMapArea::wheelEvent ( QWheelEvent *  e) [protected, virtual]
virtual void DtTMMapArea::focusOutEvent ( QFocusEvent *  e) [protected, virtual]
virtual void DtTMMapArea::leaveEvent ( QEvent *  e) [protected, virtual]
virtual void DtTMMapArea::enterEvent ( QEvent *  e) [protected, virtual]
virtual void DtTMMapArea::mouseSelect ( QMouseEvent *  e) [protected, virtual]
virtual void DtTMMapArea::mousePressSelect ( QMouseEvent *  e) [protected, virtual]
virtual void DtTMMapArea::dragEnterEvent ( QDragEnterEvent *  e) [protected, virtual]

Drag/Drop code.

Reimplemented in DtFormationEditor.

virtual void DtTMMapArea::dragLeaveEvent ( QDragLeaveEvent *  e) [protected, virtual]

Reimplemented in DtFormationEditor.

virtual void DtTMMapArea::dragMoveEvent ( QDragMoveEvent *  e) [protected, virtual]

Reimplemented in DtFormationEditor.

virtual void DtTMMapArea::dropEvent ( QDropEvent *  e) [protected, virtual]

Reimplemented in DtFormationEditor.


Member Data Documentation

Referenced by objectSelector().

QStringList DtTMMapArea::myPersistentModelData [protected]
QPoint DtTMMapArea::myMouseBegin [protected]
QPoint DtTMMapArea::myMouseLast [protected]
Qt::MouseButtons DtTMMapArea::myButtonState [protected]
Qt::KeyboardModifiers DtTMMapArea::myKeyState [protected]

Referenced by freezeSelection().

int DtTMMapArea::myKeyPressed [protected]

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)