VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
makVrf::DtVrfGuiSymbolMapper Class Reference

The class that will contain information about the currently loaded scenario.

Related Examples
Inheritance diagram for makVrf::DtVrfGuiSymbolMapper:
Inheritance graph
[legend]

Public Member Functions

 DtVrfGuiSymbolMapper (makVrv::DtDe &)
 
virtual ~DtVrfGuiSymbolMapper () override
 
virtual void clear ()
 
virtual void clearCache ()
 
virtual void clearIcons (const DtEntityMapperKey &)
 
virtual QPixmap getIcon (const DtEntityMapperKey &, bool destroyed=false, int pointSize=48, bool sizeToFont=false, DtSimObjectReference baseState=DtSimObjectReference::nullReference(), const QSize &rescaleToIconSize=QSize(), bool isSpotReport=false, const QColor &milStdOutlineColor=QColor(), bool fillMilStdSymbol=true, bool ignoreMenuIcon=false, const QColor &fillColor=Qt::transparent)
 
virtual QPixmap getIcon (const DtUUID &, int pointSize=48, bool sizeToFont=false, DtSimObjectReference baseState=DtSimObjectReference::nullReference(), const QSize &rescaleToIconSize=QSize(), bool isSpotReport=false, const QColor &milStdOutlineColor=QColor(), bool fillMilStdSymbol=true, bool ignoreMenuIcon=false)
 
virtual QPixmap getSidcIcon (const DtEntityMapperKey &key, bool destroyed=false, int pointSize=48, const std::string &sidc="", makVrv::DtSymbologyStandard symbolSet=makVrv::DtSymbologyStandard::Undefined, const QColor &milStdOutlineColor=QColor(), const QColor &fillColor=QColor())
 
virtual QPixmap getSidcIcon (const std::string &sidc, bool destroyed=false, int pointSize=48, makVrv::DtSymbologyStandard symbolSet=makVrv::DtSymbologyStandard::Undefined, const QColor &milStdOutlineColor=QColor(), const QColor &fillColor=QColor())
 
virtual int addFont (const QString &)
 
void setIconSize (int w, int h)
 
const QSize & iconSize () const
 
virtual void addSVGColorizerRule (const DtGuiSVGSymbolColorizerRule &)
 
virtual void removeSVGColorizerRule (const std::string &)
 
virtual void removeAllSVGColorizerRules ()
 
virtual QImage iconImageForIcon (const DtEntityMapperKey &, const QColor &fillColor=Qt::transparent, const QSize &iconSize=QSize(16, 16)) const
 
virtual QPixmap forceColorSwatch (int force)
 
virtual QImage convertSvgUsingColorizerRules (const DtEntityMapperKey &, const QSize &pixmapSize, const std::string &image) const
 
virtual void notifyStandardChanged (makVrv::DtSymbologyStandard standard)
 
virtual void notifyColorByForceChanged (bool b)
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

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

Public Attributes

boost::signals2::signal< void()> signal_cleared
 

Protected Types

typedef boost::unordered_map
< std::string, std::string > 
PathListMap
 
typedef std::map< std::string,
DtGuiSVGSymbolColorizerRule * > 
SVGColorizerRules
 

Protected Member Functions

virtual void notifyColorSymbolByForceChanged (bool)
 
virtual const
makVrv::DtVisualizerDefinitionSet * 
visualDefinitionSetThatBestMatches (const DtEntityMapperKey &, bool isSpotReport)
 
virtual unsigned short echelonGlyphFor (const DtEntityMapperKey &key, const makVrv::DtVisualizerDefinition *set) const
 
virtual QImage milStdRender (const makVrv::DtVisualizerDefinition *, const DtEntityMapperKey &key, bool destroyed, int pointSize, const QColor &outlineColor=QColor(), bool fillMilStdSymbol=true, DtSimObjectReference baseState=DtSimObjectReference::nullReference(), const QColor &fillColor=Qt::transparent) const
 
virtual QImage imageSymbolRender (const makVrv::DtVisualizerDefinition *, const DtEntityMapperKey &key, bool destroyed, DtSimObjectReference baseState=DtSimObjectReference::nullReference(), const QSize &iconSize=QSize(16, 16)) const
 
virtual QImage imageFromModelDefinition (const std::string &, const QSize &iconSize=QSize(16, 16)) const
 
virtual DtEntityType menuItemIconIsObjectType (const DtEntityMapperKey &) const
 
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, DtSimObjectReference baseState=DtSimObjectReference::nullReference()) const
 
virtual QImage menuItemIcon (const DtEntityMapperKey &, const QSize &iconSize=QSize()) const
 

Protected Attributes

makVrv::DtDe & myDe
 
QHash< QString, QPixmap * > myIconCache
 
QHash< int, QPixmap * > myForceSwatchCache
 
QHash< int, QString > myFontMap
 
QSize myIconSize
 
PathListMap myAggregateMap
 
PathListMap myTacticalMap
 
PathListMap myEntityMap
 
bool myColorByForce = false
 
makVrv::DtSignalConnectionManager myConnectionManager
 
SVGColorizerRules mySVGColorizerRules
 
makVrv::DtSymbologyStandard myCachedMilSymbolStandard = makVrv::DtSymbologyStandard::Undefined
 
makVrv::DtBaseConnection * myPixmapConnection = nullptr
 
makVrv::DtEntityStateListener * myPixmapListener = nullptr
 

Member Typedef Documentation

typedef boost::unordered_map<std::string, std::string> makVrf::DtVrfGuiSymbolMapper::PathListMap
protected

Constructor & Destructor Documentation

makVrf::DtVrfGuiSymbolMapper::DtVrfGuiSymbolMapper ( makVrv::DtDe &  )
virtual makVrf::DtVrfGuiSymbolMapper::~DtVrfGuiSymbolMapper ( )
overridevirtual

Member Function Documentation

static DtVrfGuiSymbolMapper& makVrf::DtVrfGuiSymbolMapper::instance ( makVrv::DtDe &  de)
static

Returns instance of the DtVrfGuiSymbolMapper.

virtual void makVrf::DtVrfGuiSymbolMapper::clear ( )
virtual

Clears out contents of symbol mapper. Calls clearCache then emits a signal.

virtual void makVrf::DtVrfGuiSymbolMapper::clearCache ( )
virtual
virtual void makVrf::DtVrfGuiSymbolMapper::clearIcons ( const DtEntityMapperKey &  )
virtual

Removes all cached information for this entity type.

virtual QPixmap makVrf::DtVrfGuiSymbolMapper::getIcon ( const DtEntityMapperKey &  ,
bool  destroyed = false,
int  pointSize = 48,
bool  sizeToFont = false,
DtSimObjectReference  baseState = DtSimObjectReference::nullReference(),
const QSize &  rescaleToIconSize = QSize(),
bool  isSpotReport = false,
const QColor &  milStdOutlineColor = QColor(),
bool  fillMilStdSymbol = true,
bool  ignoreMenuIcon = false,
const QColor &  fillColor = Qt::transparent 
)
virtual

Returns a pixmap from the entity mapper key. If sizeToFont is true, sizes to the font size, not icon size. Base state is supplied if this an icon on behalf of a published entity. Transparent fill color will mean that the default force (or user set) color will be used.

Both of these calls are used regardless of the symbol mapper selected. Internally the code will pick based on the current user selection. If the Sidc method is required it will be called with the current Sidc code in the model set entry

virtual QPixmap makVrf::DtVrfGuiSymbolMapper::getIcon ( const DtUUID &  ,
int  pointSize = 48,
bool  sizeToFont = false,
DtSimObjectReference  baseState = DtSimObjectReference::nullReference(),
const QSize &  rescaleToIconSize = QSize(),
bool  isSpotReport = false,
const QColor &  milStdOutlineColor = QColor(),
bool  fillMilStdSymbol = true,
bool  ignoreMenuIcon = false 
)
virtual
virtual QPixmap makVrf::DtVrfGuiSymbolMapper::getSidcIcon ( const DtEntityMapperKey &  key,
bool  destroyed = false,
int  pointSize = 48,
const std::string &  sidc = "",
makVrv::DtSymbologyStandard  symbolSet = makVrv::DtSymbologyStandard::Undefined,
const QColor &  milStdOutlineColor = QColor(),
const QColor &  fillColor = QColor() 
)
virtual

If the sidc is blank will look in the current model set for the Sidc code. If symbolSet is -1 use the current system default, else use the supplied of which 0 - 2525D or 1 - APP-6D are currently supported.

virtual QPixmap makVrf::DtVrfGuiSymbolMapper::getSidcIcon ( const std::string &  sidc,
bool  destroyed = false,
int  pointSize = 48,
makVrv::DtSymbologyStandard  symbolSet = makVrv::DtSymbologyStandard::Undefined,
const QColor &  milStdOutlineColor = QColor(),
const QColor &  fillColor = QColor() 
)
virtual
virtual int makVrf::DtVrfGuiSymbolMapper::addFont ( const QString &  )
virtual
void makVrf::DtVrfGuiSymbolMapper::setIconSize ( int  w,
int  h 
)
inline
const QSize& makVrf::DtVrfGuiSymbolMapper::iconSize ( ) const
inline
virtual void makVrf::DtVrfGuiSymbolMapper::addSVGColorizerRule ( const DtGuiSVGSymbolColorizerRule &  )
virtual

Adds a colorization rule. Will replace existing if there or add if not.

virtual void makVrf::DtVrfGuiSymbolMapper::removeSVGColorizerRule ( const std::string &  )
virtual
virtual void makVrf::DtVrfGuiSymbolMapper::removeAllSVGColorizerRules ( )
virtual
virtual QImage makVrf::DtVrfGuiSymbolMapper::iconImageForIcon ( const DtEntityMapperKey &  ,
const QColor &  fillColor = Qt::transparent,
const QSize &  iconSize = QSize(16, 16) 
) const
virtual

If there is a default icon list, and there is an icon image for that model set entry, and it exists, then return the image.

virtual QPixmap makVrf::DtVrfGuiSymbolMapper::forceColorSwatch ( int  force)
virtual

Returns a pixmap of current myIconSize that is a solid force color of the given force.

virtual QImage makVrf::DtVrfGuiSymbolMapper::convertSvgUsingColorizerRules ( const DtEntityMapperKey &  ,
const QSize &  pixmapSize,
const std::string &  image 
) const
virtual
virtual void makVrf::DtVrfGuiSymbolMapper::notifyStandardChanged ( makVrv::DtSymbologyStandard  standard)
virtual
virtual void makVrf::DtVrfGuiSymbolMapper::notifyColorByForceChanged ( bool  b)
virtual
virtual void makVrf::DtVrfGuiSymbolMapper::notifyColorSymbolByForceChanged ( bool  )
protectedvirtual
virtual const makVrv::DtVisualizerDefinitionSet* makVrf::DtVrfGuiSymbolMapper::visualDefinitionSetThatBestMatches ( const DtEntityMapperKey &  ,
bool  isSpotReport 
)
protectedvirtual

Returns the visual definition set that best matches the entity key (entity or tactical graphic)

virtual unsigned short makVrf::DtVrfGuiSymbolMapper::echelonGlyphFor ( const DtEntityMapperKey &  key,
const makVrv::DtVisualizerDefinition *  set 
) const
protectedvirtual
virtual QImage makVrf::DtVrfGuiSymbolMapper::milStdRender ( const makVrv::DtVisualizerDefinition *  ,
const DtEntityMapperKey &  key,
bool  destroyed,
int  pointSize,
const QColor &  outlineColor = QColor(),
bool  fillMilStdSymbol = true,
DtSimObjectReference  baseState = DtSimObjectReference::nullReference(),
const QColor &  fillColor = Qt::transparent 
) const
protectedvirtual
virtual QImage makVrf::DtVrfGuiSymbolMapper::imageSymbolRender ( const makVrv::DtVisualizerDefinition *  ,
const DtEntityMapperKey &  key,
bool  destroyed,
DtSimObjectReference  baseState = DtSimObjectReference::nullReference(),
const QSize &  iconSize = QSize(16, 16) 
) const
protectedvirtual
virtual QImage makVrf::DtVrfGuiSymbolMapper::imageFromModelDefinition ( const std::string &  ,
const QSize &  iconSize = QSize(16, 16) 
) const
protectedvirtual
virtual DtEntityType makVrf::DtVrfGuiSymbolMapper::menuItemIconIsObjectType ( const DtEntityMapperKey &  ) const
protectedvirtual

If the menu item is a object key it will return an object type that is not equal to DtObjectType()

virtual void makVrf::DtVrfGuiSymbolMapper::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,
DtSimObjectReference  baseState = DtSimObjectReference::nullReference() 
) const
protectedvirtual

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

virtual QImage makVrf::DtVrfGuiSymbolMapper::menuItemIcon ( const DtEntityMapperKey &  ,
const QSize &  iconSize = QSize() 
) const
protectedvirtual

Find the menu item entry for the specified item and see if it has an icon.

Member Data Documentation

boost::signals2::signal<void ()> makVrf::DtVrfGuiSymbolMapper::signal_cleared
makVrv::DtDe& makVrf::DtVrfGuiSymbolMapper::myDe
protected
QHash<QString, QPixmap*> makVrf::DtVrfGuiSymbolMapper::myIconCache
protected
QHash<int, QPixmap*> makVrf::DtVrfGuiSymbolMapper::myForceSwatchCache
protected
QHash<int, QString> makVrf::DtVrfGuiSymbolMapper::myFontMap
protected
QSize makVrf::DtVrfGuiSymbolMapper::myIconSize
protected
PathListMap makVrf::DtVrfGuiSymbolMapper::myAggregateMap
protected
PathListMap makVrf::DtVrfGuiSymbolMapper::myTacticalMap
protected
PathListMap makVrf::DtVrfGuiSymbolMapper::myEntityMap
protected
bool makVrf::DtVrfGuiSymbolMapper::myColorByForce = false
protected
makVrv::DtSignalConnectionManager makVrf::DtVrfGuiSymbolMapper::myConnectionManager
protected
SVGColorizerRules makVrf::DtVrfGuiSymbolMapper::mySVGColorizerRules
protected
makVrv::DtSymbologyStandard makVrf::DtVrfGuiSymbolMapper::myCachedMilSymbolStandard = makVrv::DtSymbologyStandard::Undefined
protected
makVrv::DtBaseConnection* makVrf::DtVrfGuiSymbolMapper::myPixmapConnection = nullptr
mutableprotected
makVrv::DtEntityStateListener* makVrf::DtVrfGuiSymbolMapper::myPixmapListener = nullptr
mutableprotected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)