VR-Forces 4.2 Class Documentation
bmpDrawer.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2001 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: bmpDrawer.h,v $ $Revision: 1.25 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtBMPDrawer_H_
13 #define DtBMPDrawer_H_
14 
17 class DtSymbol;
18 class DtBMPSymbol;
19 class DtCenterPoint;
20 class QBitmap;
21 
23 #include <QtCore/QCache>
24 #include <QtGui/QImage>
25 
29 
31 {
32 public:
33 
34  DtBMPDrawer();
35  virtual ~DtBMPDrawer();
36 
37  virtual bool draw( QPainter& paint,
38  const DtSymbol * const symbol ) const;
39 
42  virtual QSize calcBBox( const DtSymbol * const symbol ) const;
43 
44  static DtSymbolDrawer* create();
45 
46 protected:
47  virtual const QImage * constructBMP( const DtBMPSymbol & b ) const;
48 
49  virtual const QImage* constructHighlight( const QPixmap* p) const;
50 
51  virtual void renderBMP( QPainter& paint,
52  const DtBMPSymbol & symbol,
53  const QPixmap * pix ) const;
54 
56  virtual void applyGhosting(QImage* p) const;
57 
59  virtual const QPixmap* insertPix( const DtBMPSymbol & bmpSymbol,
60  const QImage * pix ) const;
61 
63  virtual const QPixmap* insertPix( const QString & key,
64  const QImage * pix ) const;
65 
67  virtual const QPixmap* insertHighlight( const DtBMPSymbol & bmpSymbol,
68  const QImage * pix ) const;
69 
71  virtual const QPixmap * lookupPix( const DtBMPSymbol & bmpSymbol ) const;
72 
74  virtual const QPixmap * lookupHighlight( const DtBMPSymbol & bmpSymbol ) const;
75 
76 private:
78  DtBMPDrawer(const DtBMPDrawer& orig);
79  DtBMPDrawer& operator=(const DtBMPDrawer& orig);
81 
82 protected:
86  mutable QCache<QString, const QPixmap> myCache;
87  mutable QCache<QString, const QPixmap> myHighlightCache;
88 };
89 
90 #endif
91 

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)