VR-Forces Developer's Guide
 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. It caches the icon for given entity type and force.

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

Classes

class  EntityWithForceKey
 

Public Member Functions

 DtGuiSymbolMapper (makVrv::DtDe &de)
 
virtual ~DtGuiSymbolMapper ()
 
virtual QPixmap getIcon (DtElementID id, int pointSize=80, const QColor &milStdOutlineColor=Qt::black)
 
virtual QPixmap defaultTacticalGraphicsIconImage ()
 
virtual QPixmap defaultEntityIconImage ()
 
virtual QPixmap defaultPropIconImage ()
 
virtual QPixmap defaultBuoyBeaconIconImage ()
 
virtual QPixmap defaultObserverIconImage ()
 
virtual void setDefaultTacticalGraphicsIconImage (DtUnicode file)
 
virtual void setDefaultEntityIconImage (DtUnicode file)
 
virtual void setDefaultPropIconImage (DtUnicode file)
 
virtual void setDefaultBuoyBeaconIconImage (DtUnicode file)
 
virtual void setDefaultObserverIconImage (DtUnicode file)
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static DtGuiSymbolMapperinstance (makVrv::DtDe &de)
 

Protected Member Functions

bool elementDestroyed (DtElementID id) const
 
virtual EntityWithForceKey getEntityWithForceKey (DtElementID id) const
 
virtual QPixmap milStdRender (const makVrv::DtVisualizerDefinition *vis, const EntityWithForceKey &key, bool destroyed, int pointSize, const QColor &outlineColor=Qt::black) const
 
virtual QPixmap imageSymbolRender (const makVrv::DtVisualizerDefinition *vis, const EntityWithForceKey &key, bool destroyed) const
 
virtual QPixmap pixmapFromFile (const std::string &filePathOrName, const int force) const
 
virtual QPixmap getDefaultIconPixmap (DtElementID element)
 
virtual QImage imageFromModelDefinition (const std::string &modelDef) const
 
const DtVisualizerDefinitionfindVisualDefinition2DSet (DtElementID element, const std::string &schema)
 
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
 
virtual void loadElementIconMapMappingFile ()
 
virtual QString generateIconKeyForElement (DtElementID element)
 

Protected Attributes

makVrv::DtDemyDe
 
std::unordered_map< QString,
QPixmap * > 
myIconCache
 
QPixmap * myDefaultTacticalGraphicsIconPixmap
 
QPixmap * myDefaultEntityIconPixmap
 
QPixmap * myDefaultPropIconPixmap
 
QPixmap * myDefaultBuoyBeaconIconPixmap
 
QPixmap * myDefaultObserverIconPixmap
 
std::map< DtEntityType,
std::string > 
myElementIconMap
 
std::string myElementIconMapMappingFile
 

Private Member Functions

 DtGuiSymbolMapper ()
 
 DtGuiSymbolMapper (const DtGuiSymbolMapper &orig)
 
DtGuiSymbolMapperoperator= (const DtGuiSymbolMapper &orig)
 

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 QPixmap makVrv::DtGuiSymbolMapper::defaultTacticalGraphicsIconImage ( )
virtual

Get the default tactical graphics icon image.

virtual QPixmap makVrv::DtGuiSymbolMapper::defaultEntityIconImage ( )
virtual

Get the default entity icon image.

virtual QPixmap makVrv::DtGuiSymbolMapper::defaultPropIconImage ( )
virtual

Get the default prop icon image.

virtual QPixmap makVrv::DtGuiSymbolMapper::defaultBuoyBeaconIconImage ( )
virtual

Get the default buoy and beacon icon image.

virtual QPixmap 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 QPixmap 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 QPixmap 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 QPixmap makVrv::DtGuiSymbolMapper::pixmapFromFile ( const std::string &  filePathOrName,
const int  force 
) const
protectedvirtual

Render a pixmap from the filepath or filename of an icon asset.

Parameters
filePathOrNameThe file path/name of the icon asset
forceThe force of the entity to look up a color for
virtual QPixmap makVrv::DtGuiSymbolMapper::getDefaultIconPixmap ( 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 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 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::unordered_map<QString, QPixmap*> makVrv::DtGuiSymbolMapper::myIconCache
protected
QPixmap* makVrv::DtGuiSymbolMapper::myDefaultTacticalGraphicsIconPixmap
protected
QPixmap* makVrv::DtGuiSymbolMapper::myDefaultEntityIconPixmap
protected
QPixmap* makVrv::DtGuiSymbolMapper::myDefaultPropIconPixmap
protected
QPixmap* makVrv::DtGuiSymbolMapper::myDefaultBuoyBeaconIconPixmap
protected
QPixmap* makVrv::DtGuiSymbolMapper::myDefaultObserverIconPixmap
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 Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)