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