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
#pragma once
#include <QObject>
#include "QGeoCoordinate"
#include "WimaArea.h"
class WimaAreaData : public QObject// Abstract class for all WimaAreaData derived objects
{
Q_OBJECT
public:
Q_PROPERTY(const QVariantList path READ path NOTIFY pathChanged)
Q_PROPERTY(QString type READ type CONSTANT)
WimaAreaData(QObject *parent = nullptr);
WimaAreaData(const WimaAreaData& otherData) = delete; // avoid slicing
WimaAreaData& operator=(const WimaAreaData& otherData) = delete; // avoid slicing
double maxAltitude() const;
QVariantList path() const;
QGeoCoordinate center() const;
const QList<QGeoCoordinate> &coordinateList() const;
bool containsCoordinate(const QGeoCoordinate &coordinate) const;
virtual QString type() const = 0;
void append(const QGeoCoordinate &c);
void clear();
signals:
void maxAltitudeChanged (double maxAltitude);
void pathChanged (const QVariantList& coordinateList);
void centerChanged (void);
public slots:
void setMaxAltitude(double maxAltitude);
void setPath(const QList<QGeoCoordinate> &coordinateList);
void setPath(const QVariantList &coordinateList);
void setCenter(const QGeoCoordinate ¢er);
protected:
void assign(const WimaAreaData &other);
void assign(const WimaArea &other);
private:
// Member Functions
// Member Variables
// see WimaArea.h for explanation
double _maxAltitude;
QVariantList _path;
QList<QGeoCoordinate> _list;
QGeoCoordinate _center;
};