VR-Forces 4.2 Class Documentation
List of all members | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
DtTMArea Class Reference
Inheritance diagram for DtTMArea:
Inheritance graph
[legend]

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 DtBaseSymbolMapper* DtTMArea::getSymbolMapper ( )
virtual
virtual DtTMSymbolUpdater* DtTMArea::symbolUpdater ( )
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 DtSymbolLensArea* DtTMArea::symbolLensArea ( )
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)

void DtTMArea::setAlwaysResizeToGlobalView ( bool  b)
inline

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

References myAlwaysResizeToGlobalView.

bool DtTMArea::alwaysResizeToGlobalView ( ) const
inline
virtual bool DtTMArea::terrainLoaded ( ) const
virtual

Reimplemented in DtTerrainMiniMap, and DtTerrainMapArea.

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.

void DtTMArea::viewportExtentsChanged ( const DtTMViewportExtents v)
signal

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
void DtTMArea::modelDataRemovedFromUpdate ( const DtModelData )
signal
virtual void DtTMArea::loadDatabaseFile ( const QString &  )
virtualslot
virtual void DtTMArea::setViewportExtents ( const DtTMViewportExtents v)
virtualslot

Reimplemented in DtTMMapArea.

virtual bool DtTMArea::updateAllSymbols ( )
virtualslot

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

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

Reimplemented in DtTMMapArea.

virtual void DtTMArea::modifySymbol ( const DtModelData data)
virtualslot

Reimplemented in DtTMMapArea.

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

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 ( )
virtualslot

Signals to draw order the symbols on the next tick.

virtual void DtTMArea::drawOrderSymbols ( )
virtualslot

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

virtual void DtTMArea::catchViewportChange ( const DtTMViewportExtents v)
protectedvirtualslot
virtual void DtTMArea::symbolAdded ( const DtModelKey data)
protectedvirtualslot

Called when the view driver adds or removes a symbol.

virtual void DtTMArea::symbolAdded ( const DtSymbol )
protectedvirtualslot
virtual void DtTMArea::symbolRemoved ( const DtModelKey data)
protectedvirtualslot
virtual void DtTMArea::symbolRemoved ( const DtSymbol )
protectedvirtualslot
DtTMArea& DtTMArea::operator= ( const DtTMArea rhs)
protected

Not implemented.

virtual bool DtTMArea::initViewportExtents ( const DtTMFactory f)
protectedvirtual

Reimplemented in DtTerrainMapArea.

virtual bool DtTMArea::initViewDriver ( const DtTMFactory f)
protectedvirtual

Reimplemented in DtTMMapArea.

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

Resize event.

Reimplemented in DtTMMiniMap.

virtual void DtTMArea::showEvent ( QShowEvent *  e)
protectedvirtual

Member Data Documentation

DtViewDriver* DtTMArea::myViewDriver
protected
DtTMViewportExtents* DtTMArea::myViewportExtents
protected
bool DtTMArea::myDelayGlobalResize
protected
DtSymbolLensArea* DtTMArea::myLensArea
protected
bool DtTMArea::myDeleteLensArea
protected
QPixmap* DtTMArea::myBackground
protected
QTimer DtTMArea::myResizeTimer
protected
DtTMBackground* DtTMArea::myTMBackground
protected
bool DtTMArea::myDeleteBackground
protected
DtModelDataDict DtTMArea::myModelDataDict
protected
DtModelDataIter* DtTMArea::myModelDataIter
protected
DtModelDataIter* DtTMArea::myCombinedModelDataIter
protected
bool DtTMArea::myFirstTick
protected
bool DtTMArea::myUpdateOnTick
protected
QHash<DtModelKey, DtModelData*> DtTMArea::myUpdateData
protected
bool DtTMArea::myUpdateOnlyModified
protected
bool DtTMArea::myIsInitialized
protected
bool DtTMArea::myUpdateBackgroundOnTick
protected
bool DtTMArea::myForceTickOnViewportChange
protected
bool DtTMArea::myNextTickIsRepaint
protected
DtArchiver DtTMArea::myArchiver
protected

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

bool DtTMArea::myAlwaysResizeToGlobalView
protected
DtBaseWindow* DtTMArea::myWindow
protected

Referenced by setWindow(), and window().

bool DtTMArea::myNeedsDrawOrder
protected
bool DtTMArea::myInTick
protected

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

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)