![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /********************************************************************* 00002 ** Copyright (c) 2001 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: bmpDrawer.h,v $ $Revision: 1.25 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifndef DtBMPDrawer_H_ 00013 #define DtBMPDrawer_H_ 00014 00016 #include "symbolDrawer/baseSymbolDrawer.h" 00017 class DtSymbol; 00018 class DtBMPSymbol; 00019 class DtCenterPoint; 00020 class QBitmap; 00021 00023 #include <QtCore/QCache> 00024 #include <QtGui/QImage> 00025 00028 #include "symbolDrawer/symbolDrawerDefines.h" 00029 00030 class DT_DLL_symbolDrawer DtBMPDrawer : public DtBaseSymbolDrawer 00031 { 00032 public: 00033 00034 DtBMPDrawer(); 00035 virtual ~DtBMPDrawer(); 00036 00037 virtual bool draw( QPainter& paint, 00038 const DtSymbol * const symbol ) const; 00039 00042 virtual QSize calcBBox( const DtSymbol * const symbol ) const; 00043 00044 static DtSymbolDrawer* create(); 00045 00046 protected: 00047 virtual const QImage * constructBMP( const DtBMPSymbol & b ) const; 00048 00049 virtual const QImage* constructHighlight( const QPixmap* p) const; 00050 00051 virtual void renderBMP( QPainter& paint, 00052 const DtBMPSymbol & symbol, 00053 const QPixmap * pix ) const; 00054 00056 virtual void applyGhosting(QImage* p) const; 00057 00059 virtual const QPixmap* insertPix( const DtBMPSymbol & bmpSymbol, 00060 const QImage * pix ) const; 00061 00063 virtual const QPixmap* insertPix( const QString & key, 00064 const QImage * pix ) const; 00065 00067 virtual const QPixmap* insertHighlight( const DtBMPSymbol & bmpSymbol, 00068 const QImage * pix ) const; 00069 00071 virtual const QPixmap * lookupPix( const DtBMPSymbol & bmpSymbol ) const; 00072 00074 virtual const QPixmap * lookupHighlight( const DtBMPSymbol & bmpSymbol ) const; 00075 00076 private: 00078 DtBMPDrawer(const DtBMPDrawer& orig); 00079 DtBMPDrawer& operator=(const DtBMPDrawer& orig); 00081 00082 protected: 00086 mutable QCache<QString, const QPixmap> myCache; 00087 mutable QCache<QString, const QPixmap> myHighlightCache; 00088 }; 00089 00090 #endif 00091