VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtGuiSymbolMapper Class Reference

The class will manage the icons for the entities, tactical graphics, munitions ,ect. More...

Inheritance diagram for makVrv::DtGuiSymbolMapper:
Inheritance graph
[legend]

Classes

class  EntityWithForceKey
 

Public Member Functions

 DtGuiSymbolMapper (makVrv::DtDe &de)
 CTOR. More...
 
virtual ~DtGuiSymbolMapper ()
 DTOR. More...
 
virtual QPixmap getIcon (DtElementID id, int pointSize=80, const QColor &milStdOutlineColor=Qt::black)
 Get the icon for the given element. More...
 
virtual QImage defaultTacticalGraphicsIconImage ()
 Get the default tactical graphics icon image. More...
 
virtual QImage defaultEntityIconImage ()
 Get the default entity icon image. More...
 
virtual QImage defaultPropIconImage ()
 Get the default prop icon image. More...
 
virtual QImage defaultBuoyBeaconIconImage ()
 Get the default buoy and beacon icon image. More...
 
virtual QImage defaultObserverIconImage ()
 Get the default observer icon image. More...
 
virtual void setDefaultTacticalGraphicsIconImage (DtUnicode file)
 Set the default tactical graphics icon image to use. More...
 
virtual void setDefaultEntityIconImage (DtUnicode file)
 Set the default entity icon image to use. More...
 
virtual void setDefaultPropIconImage (DtUnicode file)
 Set the default prop icon image. More...
 
virtual void setDefaultBuoyBeaconIconImage (DtUnicode file)
 Set the default buoy and beacon icon image. More...
 
virtual void setDefaultObserverIconImage (DtUnicode file)
 Set the default observer icon image. More...
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor. More...
 
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor. More...
 

Static Public Member Functions

static DtGuiSymbolMapperinstance (makVrv::DtDe &de)
 Return instance of the DtGuiSymbolMapper. More...
 

Protected Member Functions

bool elementDestroyed (DtElementID id) const
 Check if an element has been destroyed. More...
 
virtual EntityWithForceKey getEntityWithForceKey (DtElementID id) const
 Get the EntityWithForceKey for the element. More...
 
virtual QImage milStdRender (const makVrv::DtVisualizerDefinition *vis, const EntityWithForceKey &key, bool destroyed, int pointSize, const QColor &outlineColor=Qt::black) const
 Render the icon from 2525b font. More...
 
virtual QImage imageSymbolRender (const makVrv::DtVisualizerDefinition *vis, const EntityWithForceKey &key, bool destroyed) const
 Render the icon from image. More...
 
virtual QImage imageFromFile (const std::string &filePath) const
 Render the icon from image. More...
 
virtual QImage imageFromModelDefinition (const std::string &modelDef) const
 Render the icon from image given by the model definition. More...
 
const DtVisualizerDefinitionfindVisualDefinition2DSet (DtElementID element, const std::string &schema)
 Find the visual definition for the given schema. More...
 
virtual void composeMilStdImage (QPainter &painter, int left, int base, unsigned short fillGlyph, unsigned short outlineGlyph, unsigned short echelonGlyph, unsigned short destroyedGlyph, makVrv::DtForceManager::RGBAColor fillColor, makVrv::DtForceManager::RGBAColor outlineColor) const
 Paints the milStd image on the font given the glyphs and color. More...
 
virtual QImage getDefaultIconImage (DtElementID element)
 Get the default icon to use when no icon is found for the element. More...
 
virtual void loadElementIconMapMappingFile ()
 Load the icon mapping file. More...
 
virtual QString generateIconKeyForElement (DtElementID element)
 Generate the key used for the cache of icon. More...
 

Protected Attributes

makVrv::DtDemyDe
 
std::map< QString, QPixmap * > myIconCache
 
QImage * myDefaultTacticalGraphicsIconImage
 
QImage * myDefaultEntityIconImage
 
QImage * myDefaultPropIconImage
 
QImage * myDefaultBuoyBeaconIconImage
 
QImage * myDefaultObserverIconImage
 
std::map< DtEntityType,
std::string > 
myElementIconMap
 
std::string myElementIconMapMappingFile
 

Private Member Functions

 DtGuiSymbolMapper ()
 Unimplemented Default CTOR. More...
 
 DtGuiSymbolMapper (const DtGuiSymbolMapper &orig)
 Not implemented. More...
 
DtGuiSymbolMapperoperator= (const DtGuiSymbolMapper &orig)
 Not implemented. More...
 

Detailed Description

The class will manage the icons for the entities, tactical graphics, munitions ,ect.

It caches the icon for given entity type and force.

Constructor & Destructor Documentation

makVrv::DtGuiSymbolMapper::DtGuiSymbolMapper ( makVrv::DtDe de)

CTOR.

virtual makVrv::DtGuiSymbolMapper::~DtGuiSymbolMapper ( )
virtual

DTOR.

makVrv::DtGuiSymbolMapper::DtGuiSymbolMapper ( )
private

Unimplemented Default CTOR.

makVrv::DtGuiSymbolMapper::DtGuiSymbolMapper ( const DtGuiSymbolMapper orig)
private

Not implemented.

Member Function Documentation

static DtGuiSymbolMapper& makVrv::DtGuiSymbolMapper::instance ( makVrv::DtDe de)
static

Return instance of the DtGuiSymbolMapper.

virtual QPixmap makVrv::DtGuiSymbolMapper::getIcon ( DtElementID  id,
int  pointSize = 80,
const QColor &  milStdOutlineColor = Qt::black 
)
virtual

Get the icon for the given element.

Parameters
idThe element id of the element.
pointSizeThe size of the font.
milStdOutlineColorThe outline color of the 2525b symbol.
virtual QImage makVrv::DtGuiSymbolMapper::defaultTacticalGraphicsIconImage ( )
virtual

Get the default tactical graphics icon image.

virtual QImage makVrv::DtGuiSymbolMapper::defaultEntityIconImage ( )
virtual

Get the default entity icon image.

virtual QImage makVrv::DtGuiSymbolMapper::defaultPropIconImage ( )
virtual

Get the default prop icon image.

virtual QImage makVrv::DtGuiSymbolMapper::defaultBuoyBeaconIconImage ( )
virtual

Get the default buoy and beacon icon image.

virtual QImage makVrv::DtGuiSymbolMapper::defaultObserverIconImage ( )
virtual

Get the default observer icon image.

virtual void makVrv::DtGuiSymbolMapper::setDefaultTacticalGraphicsIconImage ( DtUnicode  file)
virtual

Set the default tactical graphics icon image to use.

Parameters
fileThe file to load for the icon.
virtual void makVrv::DtGuiSymbolMapper::setDefaultEntityIconImage ( DtUnicode  file)
virtual

Set the default entity icon image to use.

Parameters
fileThe file to load for the icon.
virtual void makVrv::DtGuiSymbolMapper::setDefaultPropIconImage ( DtUnicode  file)
virtual

Set the default prop icon image.

Parameters
fileThe file to load for the icon.
virtual void makVrv::DtGuiSymbolMapper::setDefaultBuoyBeaconIconImage ( DtUnicode  file)
virtual

Set the default buoy and beacon icon image.

Parameters
fileThe file to load for the icon.
virtual void makVrv::DtGuiSymbolMapper::setDefaultObserverIconImage ( DtUnicode  file)
virtual

Set the default observer icon image.

Parameters
fileThe file to load for the icon.
bool makVrv::DtGuiSymbolMapper::elementDestroyed ( DtElementID  id) const
protected

Check if an element has been destroyed.

virtual EntityWithForceKey makVrv::DtGuiSymbolMapper::getEntityWithForceKey ( DtElementID  id) const
protectedvirtual

Get the EntityWithForceKey for the element.

virtual QImage makVrv::DtGuiSymbolMapper::milStdRender ( const makVrv::DtVisualizerDefinition vis,
const EntityWithForceKey key,
bool  destroyed,
int  pointSize,
const QColor &  outlineColor = Qt::black 
) const
protectedvirtual

Render the icon from 2525b font.

Parameters
visThe visual definition point to the 2525b model definition.
keyThe EntityWithForceKey key.
destroyedIf the element is destroyed.
pointSizeThe size of the font.
milStdOutlineColorThe outline color of the 2525b symbol.
virtual QImage makVrv::DtGuiSymbolMapper::imageSymbolRender ( const makVrv::DtVisualizerDefinition vis,
const EntityWithForceKey key,
bool  destroyed 
) const
protectedvirtual

Render the icon from image.

Parameters
visThe visual definition point to the image symbol.
keyThe EntityWithForceKey key.
destroyedIf the element is destroyed.
virtual QImage makVrv::DtGuiSymbolMapper::imageFromFile ( const std::string &  filePath) const
protectedvirtual

Render the icon from image.

Parameters
visThe visual definition point to the image symbol.
keyThe EntityWithForceKey key.
destroyedIf the element is destroyed.
virtual QImage makVrv::DtGuiSymbolMapper::imageFromModelDefinition ( const std::string &  modelDef) const
protectedvirtual

Render the icon from image given by the model definition.

const DtVisualizerDefinition* makVrv::DtGuiSymbolMapper::findVisualDefinition2DSet ( DtElementID  element,
const std::string &  schema 
)
protected

Find the visual definition for the given schema.

virtual void makVrv::DtGuiSymbolMapper::composeMilStdImage ( QPainter &  painter,
int  left,
int  base,
unsigned short  fillGlyph,
unsigned short  outlineGlyph,
unsigned short  echelonGlyph,
unsigned short  destroyedGlyph,
makVrv::DtForceManager::RGBAColor  fillColor,
makVrv::DtForceManager::RGBAColor  outlineColor 
) const
protectedvirtual

Paints the milStd image on the font given the glyphs and color.

virtual QImage makVrv::DtGuiSymbolMapper::getDefaultIconImage ( DtElementID  element)
protectedvirtual

Get the default icon to use when no icon is found for the element.

Parameters
elementThe element id of the element.
virtual void makVrv::DtGuiSymbolMapper::loadElementIconMapMappingFile ( )
protectedvirtual

Load the icon mapping file.

virtual QString makVrv::DtGuiSymbolMapper::generateIconKeyForElement ( DtElementID  element)
protectedvirtual

Generate the key used for the cache of icon.

DtGuiSymbolMapper& makVrv::DtGuiSymbolMapper::operator= ( const DtGuiSymbolMapper orig)
private

Not implemented.

Member Data Documentation

makVrv::DtDe& makVrv::DtGuiSymbolMapper::myDe
protected
std::map<QString, QPixmap*> makVrv::DtGuiSymbolMapper::myIconCache
protected
QImage* makVrv::DtGuiSymbolMapper::myDefaultTacticalGraphicsIconImage
protected
QImage* makVrv::DtGuiSymbolMapper::myDefaultEntityIconImage
protected
QImage* makVrv::DtGuiSymbolMapper::myDefaultPropIconImage
protected
QImage* makVrv::DtGuiSymbolMapper::myDefaultBuoyBeaconIconImage
protected
QImage* makVrv::DtGuiSymbolMapper::myDefaultObserverIconImage
protected
std::map<DtEntityType, std::string> makVrv::DtGuiSymbolMapper::myElementIconMap
protected
std::string makVrv::DtGuiSymbolMapper::myElementIconMapMappingFile
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)