VR-Forces 4.2 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
drawerNative
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
17
#include "
drawerNative/drawerNativeDefines.h
"
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
28
const
int
DtDatabaseGridLineDrawerType
= 1;
29
const
int
DtUTMGridLineDrawerType
= 2;
30
const
int
DtUserGridLineDrawerType
= 1000;
31
32
class
DT_DLL_drawerNative
DtGridLineDrawer
33
{
34
public
:
35
enum
DtScaleType
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
:
78
const
DtCoordinateSystem
*
myCoordinateSystem
;
79
QColor
myGridLineColor
;
80
QColor
myGridLineLabelColor
;
81
DtScaleType
myScaleLine
;
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
{
96
myGridLineLabelColor
= c;
97
}
98
99
inline
const
QColor&
DtGridLineDrawer::gridLineLabelColor
()
const
100
{
101
return
myGridLineLabelColor
;
102
}
103
104
inline
void
DtGridLineDrawer::setDrawScale
(
DtGridLineDrawer::DtScaleType
s)
105
{
106
myScaleLine
= s;
107
}
108
109
inline
DtGridLineDrawer::DtScaleType
DtGridLineDrawer::drawScale
()
const
110
{
111
return
myScaleLine
;
112
}
113
114
#endif
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
)