-
Notifications
You must be signed in to change notification settings - Fork 3
/
visimage.h
63 lines (47 loc) · 1.3 KB
/
visimage.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef VISIMAGE_H
#define VISIMAGE_H
#include <QPainter>
#include <QPainterPath>
#include <QResizeEvent>
#include "entity.h"
#include "converter.h"
class VisImage : public QWidget{
public:
VisImage(QWidget *parent = nullptr);
bool isShowInfo = false;
std::vector<QColor> colorsDynProp;
std::vector<QColor> colorsWarnLevel = std::vector<QColor>(4);
std::vector<bool> showProperties;
ConfigRadar configRadar;
std::vector<CollRegion>* regions = nullptr;
QPoint sACls;
QPoint sAObj;
// --- clusters ---
ClusterList clustList;
std::vector<ClusterInfo> clusters;
// --- objects ---
ObjectList objList;
std::vector<ObjectInfo> objects;
private:
uint64_t lastDrawMs = 0;
QPainter *painter;
QPoint curs;
// NOTE: Config grid
int slicesOneSide = 6; // parts
int minLeftM = -60; // meters
int gridStepPx = 0;
float gridStepM = 0.0f;
void paintEvent(QPaintEvent *) override;
void drawZones();
void drawRegions();
void drawAxes();
void drawRadar();
void drawClusters();
void drawObjectsInfo();
void drawObjectsExt();
void drawCursor();
int calcRadius(float rcs);
protected:
void mouseMoveEvent(QMouseEvent *event) override {curs = event->pos();}
};
#endif // VISIMAGE_H