VR-Forces 4.2 Class Documentation
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions
DtMMMDrawer Class Reference

Concrete class which interprets a string as Military Map Marking symbol, and draws it using a true type font. More...

Inheritance diagram for DtMMMDrawer:
Inheritance graph
[legend]

Public Member Functions

 DtMMMDrawer ()
 DtMMMDrawer (const QString &family, int pointSize=24, const QColor &fillColor=QColor(128, 224, 225))
 Default to 24 point, force friendly blue.
virtual ~DtMMMDrawer ()
- Public Member Functions inherited from DtTTSDrawer
 DtTTSDrawer ()
 DtTTSDrawer (const QString &family, int pointSize=24)
virtual ~DtTTSDrawer ()
virtual bool draw (QPainter &paint, const DtSymbol *const symbol) const
virtual QSize calcBBox (const DtSymbol *const symbol) const
 Calculate the drawn size of this symbol.
virtual void setFont (const QString &family, unsigned pointSize)
virtual void setFont (const QFont &font)
const QFont & font () const
virtual bool compareFamily (const QString &desiredFamily, const QFont &font) const
 Compare the desired family to the one actually loaded.
virtual void paintFont (QPainter &painter, int left, int base, const DtTTSSymbol &symbol, const QColor &) const
 Paint the font symbol on the device, so that its left, bottom corner is at the specified location.
virtual void paintFont (QPainter &painter, QRect &rect, const DtTTSSymbol &t, const QColor &, int flags=0) const
virtual void setCenter (bool b)
 Sets whether or not to center the text. By default left jusitfies.
- Public Member Functions inherited from DtBaseSymbolDrawer
 DtBaseSymbolDrawer ()
virtual ~DtBaseSymbolDrawer ()
virtual bool doDrawing (QPainter &paint, const DtSymbol *const symbol)
 ! Initializes any drawing information and then calls internal draw() method
- Public Member Functions inherited from DtSymbolDrawer
 DtSymbolDrawer ()
virtual ~DtSymbolDrawer ()
virtual QRect calcBRect (const DtSymbol *const symbol) const
virtual bool forceUpdate (const DtSymbol *const symbol) const
 Override if your class wants to force a redraw of this item regardless of performance enhancement state.
virtual bool endTransparentDraw (QPainter &paint, const DtSymbol *const symbol) const
 Called after transparent draw is finished if symbol wants to draw transparently.
virtual void processHiddenSymbolAction (QPainter &paint, const DtSymbol *const symbol)
 Routine to perform even when symbol is hidden.

Static Public Member Functions

static DtSymbolDrawercreate ()
 calcBBox intentionally not reimplemented. Same as parent.

Protected Member Functions

virtual void drawSolid (QPainter &paint, const QPoint &, const DtMMMSymbol *pSymbol) const
 Paint the font symbol on the device, centered at the specified location, with a solid pattern.
virtual bool drawPattern (QPainter &paint, const QPoint &, const DtMMMSymbol *pSymbol) const
virtual void drawHighlightForPattern (QPainter &paint, const DtMMMSymbol *pSymbol) const
virtual void paintFont (QPainter &painter, int left, int base, const DtTTSSymbol &symbol) const
 Paint the font symbol on the device, so that its left, bottom corner is at the specified location.
virtual void paintPix (QPainter &paint, const QPixmap *pix, const DtMMMSymbol *pSymbol) const
 paint pixmap on our device.
virtual void paintFontOnPix (QPixmap *pix, const DtMMMSymbol *pSymbol) const
 Paint the string on a pixmap.
virtual void paintFontOnPix (QImage *pix, const DtMMMSymbol *pSymbol) const
virtual QSize fontSize (const DtMMMSymbol *pSymbol) const
virtual QPoint calcOrigin (const DtTTSSymbol *, bool calcBitmapOrigin=false) const
 Calculates the upper left corner of the text and sets the appearance font for drawing, so, if you call this routine, you do not need to call setAppearance.
virtual bool drawFont (QPainter &paint, const QPoint &origin, const DtTTSSymbol &t) const
virtual bool drawSymbolAsBitmap (QPainter &painter, const QPoint &origin, const DtTTSSymbol &t) const
virtual const QPixmap * createPix (const DtTTSSymbol *s) const
 "create" means the caller is responsible for deleting the allocated memory.
virtual QImage * createBGMask (const DtMMMSymbol *pSymbol) const
 "create" means the caller is responsible for deleting the allocated memory.
virtual QImage * createDitherMask (const DtMMMSymbol *pSymbol) const
 "create" means the caller is responsible for deleting the allocated memory.
virtual QImage * createPercentDither (const DtMMMSymbol *pSymbol) const
 "create" means the caller is responsible for deleting the allocated memory.
virtual QImage * createPatternDither (const DtMMMSymbol *pSymbol) const
 "create" means the caller is responsible for deleting the allocated memory.
- Protected Member Functions inherited from DtTTSDrawer
virtual void setAppearance (const DtTTSSymbol &s) const
 Use symbol to set attributes.
virtual QString calcKey (const DtTTSSymbol &symbol) const
virtual void createFontKey ()
virtual QHash< QString,
QPixmap >::const_iterator 
insertPix (const DtTTSSymbol &symbol, const QPixmap *pix) const
 Cache management functions.
virtual const QPixmap * lookupPix (const DtTTSSymbol &symbol) const
 Cache management functions.
- Protected Member Functions inherited from DtBaseSymbolDrawer
virtual QRgb opaqueColor () const
 ! Returns color that will be ignored during transparent draw
- Protected Member Functions inherited from DtSymbolDrawer
 DtSymbolDrawer (const DtSymbolDrawer &orig)
 Protected so not used. Conceptually class is a singleton.
DtSymbolDraweroperator= (const DtSymbolDrawer &orig)
 Protected so not used. Conceptually class is a singleton.

Private Member Functions

 DtMMMDrawer (const DtMMMDrawer &orig)
DtMMMDraweroperator= (const DtMMMDrawer &orig)

Additional Inherited Members

- Protected Attributes inherited from DtTTSDrawer
QFont myFont
 Mutable since we are just saving this information for performance reasons.
QFont myDefaultFont
QFontMetrics myFontMetrics
bool myCenter
QHash< QString, QPixmap > myCache
 mutable since we are just saving this information for performance reasons.
QString myFontKey
- Static Protected Attributes inherited from DtSymbolDrawer
static double gDrawScalingFactor
static QColor theHighlightColor

Detailed Description

Concrete class which interprets a string as Military Map Marking symbol, and draws it using a true type font.

Constructor & Destructor Documentation

DtMMMDrawer::DtMMMDrawer ( )
DtMMMDrawer::DtMMMDrawer ( const QString &  family,
int  pointSize = 24,
const QColor &  fillColor = QColor(128, 224, 225) 
)

Default to 24 point, force friendly blue.

virtual DtMMMDrawer::~DtMMMDrawer ( )
virtual
DtMMMDrawer::DtMMMDrawer ( const DtMMMDrawer orig)
private

Member Function Documentation

static DtSymbolDrawer* DtMMMDrawer::create ( )
static

calcBBox intentionally not reimplemented. Same as parent.

Reimplemented from DtTTSDrawer.

Reimplemented in DtTTFUnitSymbolDrawer.

virtual void DtMMMDrawer::drawSolid ( QPainter &  paint,
const QPoint &  ,
const DtMMMSymbol pSymbol 
) const
protectedvirtual

Paint the font symbol on the device, centered at the specified location, with a solid pattern.

virtual bool DtMMMDrawer::drawPattern ( QPainter &  paint,
const QPoint &  ,
const DtMMMSymbol pSymbol 
) const
protectedvirtual
virtual void DtMMMDrawer::drawHighlightForPattern ( QPainter &  paint,
const DtMMMSymbol pSymbol 
) const
protectedvirtual

Reimplemented in DtTTFUnitSymbolDrawer.

virtual void DtMMMDrawer::paintFont ( QPainter &  painter,
int  left,
int  base,
const DtTTSSymbol symbol 
) const
protectedvirtual

Paint the font symbol on the device, so that its left, bottom corner is at the specified location.

Reimplemented in DtTTFUnitSymbolDrawer.

virtual void DtMMMDrawer::paintPix ( QPainter &  paint,
const QPixmap *  pix,
const DtMMMSymbol pSymbol 
) const
protectedvirtual

paint pixmap on our device.

virtual void DtMMMDrawer::paintFontOnPix ( QPixmap *  pix,
const DtMMMSymbol pSymbol 
) const
protectedvirtual

Paint the string on a pixmap.

Reimplemented in DtTTFUnitSymbolDrawer.

virtual void DtMMMDrawer::paintFontOnPix ( QImage *  pix,
const DtMMMSymbol pSymbol 
) const
protectedvirtual

Reimplemented in DtTTFUnitSymbolDrawer.

virtual const QPixmap* DtMMMDrawer::createPix ( const DtTTSSymbol s) const
protectedvirtual

"create" means the caller is responsible for deleting the allocated memory.

Reimplemented from DtTTSDrawer.

virtual QImage* DtMMMDrawer::createBGMask ( const DtMMMSymbol pSymbol) const
protectedvirtual

"create" means the caller is responsible for deleting the allocated memory.

virtual QImage* DtMMMDrawer::createDitherMask ( const DtMMMSymbol pSymbol) const
protectedvirtual

"create" means the caller is responsible for deleting the allocated memory.

virtual QImage* DtMMMDrawer::createPercentDither ( const DtMMMSymbol pSymbol) const
protectedvirtual

"create" means the caller is responsible for deleting the allocated memory.

virtual QImage* DtMMMDrawer::createPatternDither ( const DtMMMSymbol pSymbol) const
protectedvirtual

"create" means the caller is responsible for deleting the allocated memory.

virtual QSize DtMMMDrawer::fontSize ( const DtMMMSymbol pSymbol) const
protectedvirtual

Reimplemented in DtTTFUnitSymbolDrawer.

virtual QPoint DtMMMDrawer::calcOrigin ( const DtTTSSymbol s,
bool  calcBitmapOrigin = false 
) const
protectedvirtual

Calculates the upper left corner of the text and sets the appearance font for drawing, so, if you call this routine, you do not need to call setAppearance.

Reimplemented from DtTTSDrawer.

Reimplemented in DtTTFUnitSymbolDrawer.

virtual bool DtMMMDrawer::drawFont ( QPainter &  paint,
const QPoint &  origin,
const DtTTSSymbol t 
) const
protectedvirtual

Reimplemented from DtTTSDrawer.

virtual bool DtMMMDrawer::drawSymbolAsBitmap ( QPainter &  painter,
const QPoint &  origin,
const DtTTSSymbol t 
) const
protectedvirtual

Reimplemented from DtTTSDrawer.

DtMMMDrawer& DtMMMDrawer::operator= ( const DtMMMDrawer orig)
private

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)