VR-Forces 4.2 Class Documentation
symbolDrawer.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2001 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: symbolDrawer.h,v $ $Revision: 1.16 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtSymbolDrawerInterface_H_
13 #define DtSymbolDrawerInterface_H_
14 
16 
17 #include <QtCore/QSize>
18 #include <QtCore/QRect>
19 #include <QtCore/QObject>
20 #include <QtGui/QColor>
21 
22 class DtSymbol;
23 class QPaintDevice;
24 class QPainter;
25 
35 
37 {
38 public:
40  virtual ~DtSymbolDrawer();
41 
44  virtual bool doDrawing(QPainter& paint,
45  const DtSymbol * const symbol);
46 
47  virtual QSize calcBBox( const DtSymbol * const symbol ) const = 0;
48  virtual QRect calcBRect( const DtSymbol * const symbol) const;
49 
53  virtual bool forceUpdate(const DtSymbol* const symbol) const;
54 
57  virtual bool endTransparentDraw(QPainter& paint,
58  const DtSymbol * const symbol) const;
59 
62  virtual void processHiddenSymbolAction(QPainter& paint, const DtSymbol * const symbol);
63 
64 public:
70  static double drawScalingFactor();
71  static void setDrawScalingFactor(double d);
72 
73  virtual bool draw(QPainter& paint,
74  const DtSymbol * const symbol ) const = 0;
75 
76  static void setHighlightColor(const QColor& color);
77  static const QColor& highlightColor();
78 
79 protected:
81  DtSymbolDrawer(const DtSymbolDrawer& orig);
82 
84  DtSymbolDrawer& operator=(const DtSymbolDrawer& orig);
85 
86 protected:
87  static double gDrawScalingFactor;
88  static QColor theHighlightColor;
89 };
90 
91 typedef DtSymbolDrawer* (*DtSymbolDrawerCreatorFcn)();
92 
93 #endif
94 

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)