VR-Forces 4.0.4 Class Documentation
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
DtTMArea Class Reference
Inheritance diagram for DtTMArea:
Inheritance graph
[legend]

List of all members.

Public Slots

virtual void loadDatabaseFile (const QString &)
virtual void setViewportExtents (const DtTMViewportExtents *v)
virtual bool updateAllSymbols ()
 Go through the list of symbols that we have marked for update and update them.
virtual void updateBackground ()
virtual void resizeMapArea ()
virtual DtSymboladdSymbol (const DtModelData &data, bool force=false)
virtual void removeSymbol (const DtModelData &data, bool force=false)
virtual void modifySymbol (const DtModelData &data)
virtual void removeSymbol (const DtModelKey &data, bool force=false)
virtual void setDrawOrderSymbols (bool b)
 Set to true to draw order symbols on the next tick.
virtual void signalDrawOrderSymbols ()
 Signals to draw order the symbols on the next tick.
virtual void drawOrderSymbols ()
 Draw order symbols if at least one first/last draw by having lens area draw order symbols.

Signals

void viewportExtentsSet (const DtTMViewportExtents *v)
 Called after setTdbView.
void viewportExtentsChanged (const DtTMViewportExtents *v)
 Called after internally changing tdb view.
void newDatabaseFile (const QString &)
void removingSymbol (const DtModelKey &data)
 Called when removing, adding or modifying a symbol.
void addingSymbol (const DtModelKey &data)
void modifyingSymbol (const DtModelKey &data)
void resized ()
 Sent when this area has resized.
void modelDataMarkedForUpdated (const DtModelData &d)
void modelDataRemovedFromUpdate (const DtModelData &)

Public Member Functions

 DtTMArea (QWidget *parent=0, const Qt::WindowFlags &flags=0)
virtual ~DtTMArea ()
virtual bool init (const DtTMFactory *f)
 Initializer. MUST BE CALLED.
virtual void setSymbolMapper (DtBaseSymbolMapper *mapper)
virtual DtBaseSymbolMappergetSymbolMapper ()
virtual DtTMSymbolUpdatersymbolUpdater ()
virtual DtTMViewportExtentsviewportExtents () const
 Gets the current viewport extents.
virtual DtViewDriverviewDriver () const
 Gets the current view driver.
virtual void setViewDriver (DtViewDriver *v)
 Sets the current view driver.
virtual DtTMBackgroundbackground () const
 Gets the current background.
virtual void setBackground (DtTMBackground *v)
 Sets the current background.
virtual void setSymbolLensArea (DtSymbolLensArea *area)
virtual DtSymbolLensAreasymbolLensArea ()
virtual bool tick ()
 area was modified because of the tick
virtual bool isInitialized ()
virtual DtModelDataDictModelDataDict ()
 Returns the local list of Symbol Datas.
virtual DtModelDataIterModelDataIter () const
 Returns the local list of Symbol Datas.
virtual DtModelDataIterCombinedModelDataIter () const
 Returns the combined list of global application and local model data.
virtual void setUpdateOnTick (bool b)
 Set the fact that this area will also refresh its display on a tick.
virtual void markForUpdate (const QVector< DtModelKey > &, bool emitSignal=true)
 Copy the model data from the supplied list to our internal update list that will be updated on the next call to updateAllSymbols.
virtual void markForUpdate (DtModelDataIter *iter, bool emitSignal=true)
virtual void markForUpdate (const DtModelData &data, bool emitSignal=true)
virtual void removeFromUpdate (DtModelDataIter *iter)
 Call these to remove model datas for update.
virtual void removeFromUpdate (const DtModelData &data)
virtual void removeDictionaryEntry (const DtModelKey &key)
 Removes this entry from the local dictionary.
virtual void setUpdateBackgroundOnTick (bool b)
 Set to true to call updateBackground on next tick.
void setNextTickIsRepaint (bool b)
 Set to have the next update (if the area is updated in a tick) to be a repaint rather than an update.
bool nextTickIsRepaint () const
virtual bool needsTick () const
 Return true if this area needs to be ticked.
virtual bool needsUpdate () const
 Return true if this area needs update because myUpdateData.count() is not zero.
virtual DtSymboladdSymbol (const DtModelData &data, DtSymbol *symbol)
 Adds a new symbol with the associated model data to the map area.
virtual void read (QTextStream &ts)
 Archival operators.
virtual void write (QTextStream &ts)
virtual void clear ()
 Tells view driver to clear out any symbols and then clears out local data dictionary of any data.
virtual void clearSymbols ()
virtual void setForceTickOnViewportChange (bool b)
 Set this to true to force a tick when the viewport has changed (to speed drawing on map areas).
virtual bool forceTickOnViewportChange () const
virtual void paint (QPainter *painter, bool paintBackground=true)
 Draw to the supplied device. Draws the background (if specified) and the lens area.
virtual void redrawBackground ()
virtual DtSymbolgetSymbol (const DtModelKey &) const
 Returns a symbol from the view driver for the given model key (if exists)
void setAlwaysResizeToGlobalView (bool)
 If true, when map area is resized, always go back to global view.
bool alwaysResizeToGlobalView () const
virtual bool terrainLoaded () const
void setWindow (DtBaseWindow *)
DtBaseWindowwindow () const
virtual bool needsDrawOrder () const
 Return true/false depending on whether or not the area cares about draw ordering symbols.
virtual void insertIntoDrawOrder (DtSymbol *)
 Insert symbol into lens area draw order.

Protected Slots

virtual void catchViewportChange (const DtTMViewportExtents *v)
virtual void symbolAdded (const DtModelKey &data)
 Called when the view driver adds or removes a symbol.
virtual void symbolAdded (const DtSymbol *)
virtual void symbolRemoved (const DtModelKey &data)
virtual void symbolRemoved (const DtSymbol *)

Protected Member Functions

 DtTMArea (const DtTMArea &orig)
 Not implemented.
DtTMAreaoperator= (const DtTMArea &rhs)
 Not implemented.
virtual bool initViewportExtents (const DtTMFactory *f)
virtual bool initViewDriver (const DtTMFactory *f)
virtual bool initLensArea (const DtTMFactory *f, bool useGL=false)
virtual bool initBackground (const DtTMFactory *f)
virtual void resizeEvent (QResizeEvent *e)
 Resize event.
virtual void showEvent (QShowEvent *e)

Protected Attributes

DtViewDrivermyViewDriver
DtTMViewportExtentsmyViewportExtents
bool myDelayGlobalResize
DtSymbolLensAreamyLensArea
bool myDeleteLensArea
QPixmap * myBackground
QTimer myResizeTimer
DtTMBackgroundmyTMBackground
bool myDeleteBackground
DtModelDataDict myModelDataDict
DtModelDataItermyModelDataIter
DtModelDataItermyCombinedModelDataIter
bool myFirstTick
bool myUpdateOnTick
QHash< DtModelKey, DtModelData * > myUpdateData
bool myUpdateOnlyModified
bool myIsInitialized
bool myUpdateBackgroundOnTick
bool myForceTickOnViewportChange
bool myNextTickIsRepaint
DtArchiver myArchiver
 Used to write out any variables that want to be saved.
bool myAlwaysResizeToGlobalView
DtBaseWindowmyWindow
bool myNeedsDrawOrder
bool myInTick

Constructor & Destructor Documentation

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

Not implemented.


Member Function Documentation

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

Initializer. MUST BE CALLED.

Reimplemented in DtTerrainMapArea, DtTMMapArea, DtTMMiniMap, and DtTerrainMiniMap.

virtual void DtTMArea::setSymbolMapper ( DtBaseSymbolMapper mapper) [virtual]
virtual DtTMViewportExtents* DtTMArea::viewportExtents ( ) const [virtual]

Gets the current viewport extents.

virtual DtViewDriver* DtTMArea::viewDriver ( ) const [virtual]

Gets the current view driver.

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

Sets the current view driver.

virtual DtTMBackground* DtTMArea::background ( ) const [virtual]

Gets the current background.

virtual void DtTMArea::setBackground ( DtTMBackground v) [virtual]

Sets the current background.

virtual void DtTMArea::setSymbolLensArea ( DtSymbolLensArea area) [virtual]
virtual bool DtTMArea::tick ( ) [virtual]

area was modified because of the tick

Reimplemented in DtTMMapArea.

virtual bool DtTMArea::isInitialized ( ) [virtual]
virtual DtModelDataDict& DtTMArea::ModelDataDict ( ) [virtual]

Returns the local list of Symbol Datas.

virtual DtModelDataIter* DtTMArea::ModelDataIter ( ) const [virtual]

Returns the local list of Symbol Datas.

virtual DtModelDataIter* DtTMArea::CombinedModelDataIter ( ) const [virtual]

Returns the combined list of global application and local model data.

virtual void DtTMArea::setUpdateOnTick ( bool  b) [virtual]

Set the fact that this area will also refresh its display on a tick.

This needs to be set in instances where something changes the area that the area does not know about

virtual void DtTMArea::markForUpdate ( const QVector< DtModelKey > &  ,
bool  emitSignal = true 
) [virtual]

Copy the model data from the supplied list to our internal update list that will be updated on the next call to updateAllSymbols.

virtual void DtTMArea::markForUpdate ( DtModelDataIter iter,
bool  emitSignal = true 
) [virtual]
virtual void DtTMArea::markForUpdate ( const DtModelData data,
bool  emitSignal = true 
) [virtual]

Reimplemented in DtTerrainMapArea.

virtual void DtTMArea::removeFromUpdate ( DtModelDataIter iter) [virtual]

Call these to remove model datas for update.

virtual void DtTMArea::removeFromUpdate ( const DtModelData data) [virtual]
virtual void DtTMArea::removeDictionaryEntry ( const DtModelKey key) [virtual]

Removes this entry from the local dictionary.

virtual void DtTMArea::setUpdateBackgroundOnTick ( bool  b) [virtual]

Set to true to call updateBackground on next tick.

void DtTMArea::setNextTickIsRepaint ( bool  b) [inline]

Set to have the next update (if the area is updated in a tick) to be a repaint rather than an update.

This will cause an immediate paint rather than a paint to be put into the next Qt event. Note this could cause multiple paints to happen during a single event pass

References myNextTickIsRepaint.

bool DtTMArea::nextTickIsRepaint ( ) const [inline]

References myNextTickIsRepaint.

virtual bool DtTMArea::needsTick ( ) const [virtual]

Return true if this area needs to be ticked.

virtual bool DtTMArea::needsUpdate ( ) const [virtual]

Return true if this area needs update because myUpdateData.count() is not zero.

virtual DtSymbol* DtTMArea::addSymbol ( const DtModelData data,
DtSymbol symbol 
) [virtual]

Adds a new symbol with the associated model data to the map area.

It will also add it to the myModelDataDict dictionary, effectively making it a local symbol. Do not use this call if you want your symbol to be added to each new window, but rather add it to the main application model data dictionary and create it using the symbol mapper class

virtual void DtTMArea::read ( QTextStream &  ts) [virtual]

Archival operators.

virtual void DtTMArea::write ( QTextStream &  ts) [virtual]
virtual void DtTMArea::clear ( ) [virtual]

Tells view driver to clear out any symbols and then clears out local data dictionary of any data.

Reimplemented in DtTMMapArea.

virtual void DtTMArea::clearSymbols ( ) [virtual]
virtual void DtTMArea::setForceTickOnViewportChange ( bool  b) [virtual]

Set this to true to force a tick when the viewport has changed (to speed drawing on map areas).

By default false

virtual bool DtTMArea::forceTickOnViewportChange ( ) const [virtual]
virtual void DtTMArea::paint ( QPainter *  painter,
bool  paintBackground = true 
) [virtual]

Draw to the supplied device. Draws the background (if specified) and the lens area.

virtual void DtTMArea::redrawBackground ( ) [virtual]
virtual DtSymbol* DtTMArea::getSymbol ( const DtModelKey ) const [virtual]

Returns a symbol from the view driver for the given model key (if exists)

If true, when map area is resized, always go back to global view.

References myAlwaysResizeToGlobalView.

virtual bool DtTMArea::terrainLoaded ( ) const [virtual]
void DtTMArea::setWindow ( DtBaseWindow w) [inline]

References myWindow.

DtBaseWindow * DtTMArea::window ( ) const [inline]

References myWindow.

virtual bool DtTMArea::needsDrawOrder ( ) const [virtual]

Return true/false depending on whether or not the area cares about draw ordering symbols.

By default returns true. Currently only used by the overlay filter lens

Reimplemented in DtTMMiniMap.

virtual void DtTMArea::insertIntoDrawOrder ( DtSymbol ) [virtual]

Insert symbol into lens area draw order.

void DtTMArea::viewportExtentsSet ( const DtTMViewportExtents v) [signal]

Called after setTdbView.

Called after internally changing tdb view.

void DtTMArea::newDatabaseFile ( const QString &  ) [signal]
void DtTMArea::removingSymbol ( const DtModelKey data) [signal]

Called when removing, adding or modifying a symbol.

void DtTMArea::addingSymbol ( const DtModelKey data) [signal]
void DtTMArea::modifyingSymbol ( const DtModelKey data) [signal]
void DtTMArea::resized ( ) [signal]

Sent when this area has resized.

void DtTMArea::modelDataMarkedForUpdated ( const DtModelData d) [signal]
virtual void DtTMArea::loadDatabaseFile ( const QString &  ) [virtual, slot]
virtual void DtTMArea::setViewportExtents ( const DtTMViewportExtents v) [virtual, slot]

Reimplemented in DtTMMapArea.

virtual bool DtTMArea::updateAllSymbols ( ) [virtual, slot]

Go through the list of symbols that we have marked for update and update them.

virtual void DtTMArea::updateBackground ( ) [virtual, slot]
virtual void DtTMArea::resizeMapArea ( ) [virtual, slot]
virtual DtSymbol* DtTMArea::addSymbol ( const DtModelData data,
bool  force = false 
) [virtual, slot]
virtual void DtTMArea::removeSymbol ( const DtModelData data,
bool  force = false 
) [virtual, slot]

Reimplemented in DtTMMapArea.

virtual void DtTMArea::modifySymbol ( const DtModelData data) [virtual, slot]

Reimplemented in DtTMMapArea.

virtual void DtTMArea::removeSymbol ( const DtModelKey data,
bool  force = false 
) [virtual, slot]
virtual void DtTMArea::setDrawOrderSymbols ( bool  b) [virtual, slot]

Set to true to draw order symbols on the next tick.

Symbols will be draw ordered if there is at least one symbol that wants to be draw first or last

virtual void DtTMArea::signalDrawOrderSymbols ( ) [virtual, slot]

Signals to draw order the symbols on the next tick.

virtual void DtTMArea::drawOrderSymbols ( ) [virtual, slot]

Draw order symbols if at least one first/last draw by having lens area draw order symbols.

virtual void DtTMArea::catchViewportChange ( const DtTMViewportExtents v) [protected, virtual, slot]

Reimplemented in DtTMMapArea.

virtual void DtTMArea::symbolAdded ( const DtModelKey data) [protected, virtual, slot]

Called when the view driver adds or removes a symbol.

virtual void DtTMArea::symbolAdded ( const DtSymbol ) [protected, virtual, slot]
virtual void DtTMArea::symbolRemoved ( const DtModelKey data) [protected, virtual, slot]
virtual void DtTMArea::symbolRemoved ( const DtSymbol ) [protected, virtual, slot]
DtTMArea& DtTMArea::operator= ( const DtTMArea rhs) [protected]

Not implemented.

virtual bool DtTMArea::initViewportExtents ( const DtTMFactory f) [protected, virtual]

Reimplemented in DtTerrainMapArea.

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

Reimplemented in DtTMMapArea.

virtual bool DtTMArea::initLensArea ( const DtTMFactory f,
bool  useGL = false 
) [protected, virtual]
virtual bool DtTMArea::initBackground ( const DtTMFactory f) [protected, virtual]
virtual void DtTMArea::resizeEvent ( QResizeEvent *  e) [protected, virtual]

Resize event.

Reimplemented in DtFormationEditor, and DtTMMiniMap.

virtual void DtTMArea::showEvent ( QShowEvent *  e) [protected, virtual]

Member Data Documentation

QPixmap* DtTMArea::myBackground [protected]
QTimer DtTMArea::myResizeTimer [protected]

Used to write out any variables that want to be saved.

Referenced by setWindow(), and window().

bool DtTMArea::myInTick [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)