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

Qt includes. More...

Inheritance diagram for DtBMPDrawer:
Inheritance graph
[legend]

Public Member Functions

 DtBMPDrawer ()
virtual ~DtBMPDrawer ()
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.
- 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 ()

Protected Member Functions

virtual const QImage * constructBMP (const DtBMPSymbol &b) const
virtual const QImage * constructHighlight (const QPixmap *p) const
virtual void renderBMP (QPainter &paint, const DtBMPSymbol &symbol, const QPixmap *pix) const
virtual void applyGhosting (QImage *p) const
 Adds a pixelation mask to the pixmap.
virtual const QPixmap * insertPix (const DtBMPSymbol &bmpSymbol, const QImage *pix) const
 Insert pixmap into cache.
virtual const QPixmap * insertPix (const QString &key, const QImage *pix) const
 Insert pixmap into cache.
virtual const QPixmap * insertHighlight (const DtBMPSymbol &bmpSymbol, const QImage *pix) const
 Insert pixmap into cache.
virtual const QPixmap * lookupPix (const DtBMPSymbol &bmpSymbol) const
 Find pixmap corresponding to symbol in cache.
virtual const QPixmap * lookupHighlight (const DtBMPSymbol &bmpSymbol) const
 Find pixmap corresponding to symbol in cache.
- 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.

Protected Attributes

QCache< QString, const QPixmap > myCache
 Mutable since cache is for optimization purposes only.
QCache< QString, const QPixmap > myHighlightCache

Private Member Functions

 DtBMPDrawer (const DtBMPDrawer &orig)
DtBMPDraweroperator= (const DtBMPDrawer &orig)

Additional Inherited Members

- Static Protected Attributes inherited from DtSymbolDrawer
static double gDrawScalingFactor
static QColor theHighlightColor

Detailed Description

Qt includes.

Concrete class which draws bitmaps., This should be connected to the DtBMPSymbol in order to actually draw

Constructor & Destructor Documentation

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

Member Function Documentation

virtual bool DtBMPDrawer::draw ( QPainter &  paint,
const DtSymbol *const  symbol 
) const
virtual

Implements DtSymbolDrawer.

virtual QSize DtBMPDrawer::calcBBox ( const DtSymbol *const  symbol) const
virtual

Calculate the drawn size of this symbol.

The symbol must be of a type this drawer can recognize.

Implements DtSymbolDrawer.

static DtSymbolDrawer* DtBMPDrawer::create ( )
static
virtual const QImage* DtBMPDrawer::constructBMP ( const DtBMPSymbol b) const
protectedvirtual
virtual const QImage* DtBMPDrawer::constructHighlight ( const QPixmap *  p) const
protectedvirtual
virtual void DtBMPDrawer::renderBMP ( QPainter &  paint,
const DtBMPSymbol symbol,
const QPixmap *  pix 
) const
protectedvirtual
virtual void DtBMPDrawer::applyGhosting ( QImage *  p) const
protectedvirtual

Adds a pixelation mask to the pixmap.

virtual const QPixmap* DtBMPDrawer::insertPix ( const DtBMPSymbol bmpSymbol,
const QImage *  pix 
) const
protectedvirtual

Insert pixmap into cache.

virtual const QPixmap* DtBMPDrawer::insertPix ( const QString &  key,
const QImage *  pix 
) const
protectedvirtual

Insert pixmap into cache.

virtual const QPixmap* DtBMPDrawer::insertHighlight ( const DtBMPSymbol bmpSymbol,
const QImage *  pix 
) const
protectedvirtual

Insert pixmap into cache.

virtual const QPixmap* DtBMPDrawer::lookupPix ( const DtBMPSymbol bmpSymbol) const
protectedvirtual

Find pixmap corresponding to symbol in cache.

virtual const QPixmap* DtBMPDrawer::lookupHighlight ( const DtBMPSymbol bmpSymbol) const
protectedvirtual

Find pixmap corresponding to symbol in cache.

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

Member Data Documentation

QCache<QString, const QPixmap> DtBMPDrawer::myCache
mutableprotected

Mutable since cache is for optimization purposes only.

Conceptually there should be no difference in const between the first and second time a symbol is drawn.

QCache<QString, const QPixmap> DtBMPDrawer::myHighlightCache
mutableprotected

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)