QCAD Application Framework
CAD Application Development and Automation.
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
ROrthoGrid.h
Go to the documentation of this file.
1
#ifndef RORTHOGRID_H
2
#define RORTHOGRID_H
3
4
#include "
RGrid.h
"
5
6
class
RGraphicsView
;
7
class
RRuler
;
8
9
10
19
class
ROrthoGrid
:
public
RGrid
{
20
public
:
21
ROrthoGrid
();
22
virtual
~ROrthoGrid
();
23
24
RVector
snapToGrid
(
RGraphicsView
& view,
const
RVector
& positionUcs);
25
virtual
void
update
(
RGraphicsView
& view,
bool
force=
false
);
26
virtual
void
paint
(
RGraphicsView
& view);
27
virtual
void
paintMetaGrid
(
RGraphicsView
& view);
28
29
virtual
void
paintRuler
(
RGraphicsView
& view,
RRuler
& ruler);
30
31
virtual
QString
getInfoText
();
32
33
static
QList<RVector>
getIdealSpacing
(
const
RGraphicsView
& view,
int
minPixelSpacing
,
const
RVector
&
minSpacing
);
34
35
// This is just an idea. This might update the grid for
36
// an entity that is viewed as elevation view. This might be at
37
// any angle.
38
//void updateGrid(REntity& entity);
39
40
static
bool
isFractionalFormat
(
RS::LinearFormat
linearFormat);
41
42
private
:
43
static
double
inchAutoscale
(
double
value,
double
idealSpacing,
RS::Unit
unit);
44
45
private
:
46
RBox
viewBox
;
47
RBox
gridBox
;
48
RBox
metaGridBox
;
49
RVector
spacing
;
50
RVector
autoSpacing
;
51
RVector
minSpacing
;
52
RVector
metaSpacing
;
53
RVector
autoMetaSpacing
;
54
bool
scaleGrid
;
55
int
minPixelSpacing
;
56
//RS::Unit unit;
57
QString
infoText
;
58
};
59
60
Q_DECLARE_METATYPE
(
ROrthoGrid
*)
61
62
#endif
src
grid
ROrthoGrid.h
Generated on Tue Jun 26 2012 18:41:08 for QCAD Application Framework by
1.8.1.1