-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgrid.h
47 lines (33 loc) · 914 Bytes
/
grid.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef GRID_H
#define GRID_H
#include <QObject>
#include <QPainter>
#include <QPen>
#include <QDebug>
class Grid : public QObject
{
Q_OBJECT
public:
explicit Grid(int x, int y, int w, int h, QObject *parent = 0);
int getXGridDensity() const;
void setXGridDensity(double value);
int getYGridDensity() const;
void setYGridDensity(double value);
void drawGrid(QPainter *painter);
QPen getGridLineProperties() const;
void setGridLineProperties();
void drawXgridLine(QPainter *painter);
void drawYgridLine(QPainter *painter);
void setGeometry(int x, int y, int w, int h);
private:
int graph_x;
int graph_y;
int graph_w;
int graph_h;
int xGridDensity;
int yGridDensity;
bool visible; //flaga informujaca o tym czy siatka jest widoczna.
protected slots:
void setDensitiy(double xDensity, double yDensity);
};
#endif // GRID_H