-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdronepath.h
More file actions
41 lines (32 loc) · 804 Bytes
/
dronepath.h
File metadata and controls
41 lines (32 loc) · 804 Bytes
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
#ifndef DRONEPATH_H
#define DRONEPATH_H
#include <QObject>
#include <QVector>
#include <QGraphicsPathItem>
#include <QPainter>
#include <QPen>
#include "controlpoint.h"
class DronePath : public QObject
{
Q_OBJECT
public:
explicit DronePath(QObject *parent = nullptr);
explicit DronePath(QGeoCoordinate center);
void setCenter(QGeoCoordinate c);
void addPoint(int id,QGeoCoordinate cp);
QVector<ControlPoint *> & getControlPoints();
QGraphicsPathItem & getPath();
QGraphicsPathItem & getPointPath();
QGeoCoordinate ¤t();
public slots:
void updatePath();
signals:
private:
QGeoCoordinate center;
QVector<ControlPoint * > cps;
QGraphicsPathItem path;
QGraphicsPathItem connection;
QPen pen1;
QPen pen2;
};
#endif // DRONEPATH_H