]> Shamusworld >> Repos - architektonas/blob - src/base/rs_grid.h
d2ba69a76b157aca5b573412624454106e2637c8
[architektonas] / src / base / rs_grid.h
1 #ifndef RS_GRID_H
2 #define RS_GRID_H
3
4 #include <QtCore>
5
6 //class RS_GraphicView;
7 class GraphicView;
8 class Vector;
9
10 /**
11  * This class represents a grid. Grids can be drawn on graphic
12  * views and snappers can snap to the grid points.
13  *
14  * @author Andrew Mustun
15  */
16 class RS_Grid
17 {
18         public:
19 //              RS_Grid(RS_GraphicView *);
20                 RS_Grid(GraphicView *);
21                 ~RS_Grid();
22
23                 void update();
24
25                 Vector * getPoints();
26                 int count();
27                 QString getInfo();
28                 double * getMetaX();
29                 int countMetaX();
30                 double * getMetaY();
31                 int countMetaY();
32
33         protected:
34                 //! Graphic view this grid is connected to.
35 //              RS_GraphicView * graphicView;
36                 GraphicView * graphicView;
37
38                 //! Current grid spacing
39                 double spacing;
40                 //! Current meta grid spacing
41                 double metaSpacing;
42
43                 //! Pointer to array of grid points
44                 Vector * pt;
45                 //! Number of points in the array
46                 int number;
47                 //! Meta grid positions in X
48                 double * metaX;
49                 //! Number of meta grid lines in X
50                 int numMetaX;
51                 //! Meta grid positions in Y
52                 double * metaY;
53                 //! Number of meta grid lines in Y
54                 int numMetaY;
55 };
56
57 #endif