VR-Forces 4.1 Class Documentation
gridLineDrawer.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2008 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: gridLineDrawer.h,v $ $Revision: 1.1 $ $State: Exp $
7 *********************************************************************/
8 
11 
13 
14 #ifndef DTGRIDLINEDRAWER_H_
15 #define DTGRIDLINEDRAWER_H_
16 
18 
19 #include <QtGui/QColor>
20 
21 class DtExtent;
22 class DtPrimitiveDrawer;
23 class DtTerrainDatabase;
24 class DtViewportExtents;
25 class DtPoint;
26 class DtCoordinateSystem;
27 
30 const int DtUserGridLineDrawerType = 1000;
31 
33 {
34 public:
36  {
37  DtGridScale= 0,
38  DtScaleLowerLeft = 1,
39  DtScaleLowerRight = 2
40  };
41 
42 public:
43  DtGridLineDrawer(const DtCoordinateSystem* c) : myCoordinateSystem(c),
44  myScaleLine(DtGridScale)
45  {
46  };
47 
48  DtGridLineDrawer(const DtGridLineDrawer& orig) : myCoordinateSystem(orig.myCoordinateSystem),
49  myGridLineColor(orig.myGridLineColor), myGridLineLabelColor(orig.myGridLineLabelColor), myScaleLine(orig.myScaleLine)
50  {
51  };
52 
53  virtual ~DtGridLineDrawer() {};
54 
55  void setGridLineColor(const QColor&);
56  const QColor& gridLineColor() const;
57 
58  void setGridLineLabelColor(const QColor&);
59  const QColor& gridLineLabelColor() const;
60 
62  void setDrawScale(DtGridLineDrawer::DtScaleType);
63  DtGridLineDrawer::DtScaleType drawScale() const;
64 
65 public:
67  virtual void drawGridLines(const DtPoint &vp_min_WC, const DtPoint &vp_max_WC,
68  double increment, const DtTerrainDatabase* db, const DtViewportExtents* v, DtPrimitiveDrawer* painter) = 0;
69 
71  virtual DtGridLineDrawer* clone() = 0;
72 
75  virtual int type() const = 0;
76 
77 protected:
82 };
83 
84 inline void DtGridLineDrawer::setGridLineColor(const QColor& c)
85 {
86  myGridLineColor = c;
87 }
88 
89 inline const QColor& DtGridLineDrawer::gridLineColor() const
90 {
91  return myGridLineColor;
92 }
93 
94 inline void DtGridLineDrawer::setGridLineLabelColor(const QColor& c)
95 {
97 }
98 
99 inline const QColor& DtGridLineDrawer::gridLineLabelColor() const
100 {
101  return myGridLineLabelColor;
102 }
103 
105 {
106  myScaleLine = s;
107 }
108 
110 {
111  return myScaleLine;
112 }
113 
114 #endif

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)