]> Shamusworld >> Repos - architektonas/blob - src/base/grid.h
Bugfixes related to removing Snapper class.
[architektonas] / src / base / grid.h
1 #ifndef __GRID_H__
2 #define __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 Grid
17 {
18         public:
19 //              Grid(RS_GraphicView *);
20                 Grid(GraphicView *);
21                 ~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