forked from apsystems/GrblHoming
-
Notifications
You must be signed in to change notification settings - Fork 190
/
renderitemlist.h
42 lines (36 loc) · 1019 Bytes
/
renderitemlist.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
#ifndef RENDERITEMLIST_H
#define RENDERITEMLIST_H
#include "arcitem.h"
#include "lineitem.h"
#include "pointitem.h"
#define SCREEN_SCALE_FILE 0.85
class RenderItemList
{
public:
RenderItemList();
virtual ~RenderItemList();
void convertList(const QList<PosItem>& items);
void rescale(const QSize& size);
void writePath(QPainter& painter, bool updatedFromFile);
void drawAxes(QPainter& painter);
void drawMeasurements(QPainter& painter);
void drawPoint(QPainter& painter, const PosItem& point);
bool setCurrFileLine(const int currLine);
void setLivePoint(const PosItem& livePoint);
void updateLivePoint();
private:
void clearList();
void writeText(QPainter& painter, QString text, double x, double y, int avgCharWd);
private:
QList<ItemToBase *> list;
double scale;
double offsetx;
double offsety;
PosItem extents;
QSize windowSize;
bool mm;
int currFileLine;
PosItem livePoint;
QFont font;
};
#endif // RENDERITEMLIST_H