![]() |
VR-Forces Developer's Guide
|
The class will manage the icons for the entities, tactical graphics, munitions ,ect. It caches the icon for given entity type and force.

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 DtGuiSymbolMapper & | instance (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 DtVisualizerDefinition * | findVisualDefinition2DSet (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::DtDe & | myDe |
| 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) | |
| DtGuiSymbolMapper & | operator= (const DtGuiSymbolMapper &orig) |
| makVrv::DtGuiSymbolMapper::DtGuiSymbolMapper | ( | makVrv::DtDe & | de | ) |
CTOR.
|
virtual |
DTOR.
|
private |
Unimplemented Default CTOR.
|
private |
Not implemented.
|
static |
Return instance of the DtGuiSymbolMapper.
|
virtual |
Get the icon for the given element.
| id | The element id of the element. |
| pointSize | The size of the font. |
| milStdOutlineColor | The outline color of the 2525b symbol. |
|
virtual |
Get the default tactical graphics icon image.
|
virtual |
Get the default entity icon image.
|
virtual |
Get the default prop icon image.
|
virtual |
Get the default buoy and beacon icon image.
|
virtual |
Get the default observer icon image.
|
virtual |
Set the default tactical graphics icon image to use.
| file | The file to load for the icon. |
|
virtual |
Set the default entity icon image to use.
| file | The file to load for the icon. |
|
virtual |
Set the default prop icon image.
| file | The file to load for the icon. |
|
virtual |
Set the default buoy and beacon icon image.
| file | The file to load for the icon. |
|
virtual |
Set the default observer icon image.
| file | The file to load for the icon. |
|
protected |
Check if an element has been destroyed.
|
protectedvirtual |
Get the EntityWithForceKey for the element.
|
protectedvirtual |
Render the icon from 2525b font.
| vis | The visual definition point to the 2525b model definition. |
| key | The EntityWithForceKey key. |
| destroyed | If the element is destroyed. |
| pointSize | The size of the font. |
| milStdOutlineColor | The outline color of the 2525b symbol. |
|
protectedvirtual |
Render the icon from image.
| vis | The visual definition point to the image symbol. |
| key | The EntityWithForceKey key. |
| destroyed | If the element is destroyed. |
|
protectedvirtual |
Render a pixmap from the filepath or filename of an icon asset.
| filePathOrName | The file path/name of the icon asset |
| force | The force of the entity to look up a color for |
|
protectedvirtual |
Get the default icon to use when no icon is found for the element.
| element | The element id of the element. |
|
protectedvirtual |
Render the icon from image given by the model definition.
|
protected |
Find the visual definition for the given schema.
|
protectedvirtual |
Paints the milStd image on the font given the glyphs and color.
|
protectedvirtual |
Load the icon mapping file.
|
protectedvirtual |
Generate the key used for the cache of icon.
|
private |
Not implemented.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |