QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCFencePolygon.h
Go to the documentation of this file.
1#pragma once
2
3#include "QGCMapPolygon.h"
4
7{
8 Q_OBJECT
9
10public:
11 QGCFencePolygon(bool inclusion, QObject* parent = nullptr);
12 QGCFencePolygon(const QGCFencePolygon& other, QObject* parent = nullptr);
13
14 const QGCFencePolygon& operator=(const QGCFencePolygon& other);
15
16 Q_PROPERTY(bool inclusion READ inclusion WRITE setInclusion NOTIFY inclusionChanged)
17
18
20 void saveToJson(QJsonObject& json);
21
27 bool loadFromJson(const QJsonObject& json, bool required, QString& errorString);
28
29 // Property methods
30
31 bool inclusion (void) const { return _inclusion; }
32 void setInclusion (bool inclusion);
33
34signals:
36
37private slots:
38 void _setDirty(void);
39
40private:
41 void _init(void);
42
43 bool _inclusion;
44
45 static constexpr int _jsonCurrentVersion = 1;
46
47 static constexpr const char* _jsonInclusionKey = "inclusion";
48};
QString errorString
The QGCFencePolygon class provides a polygon used by GeoFence support.
bool inclusion READ inclusion WRITE setInclusion NOTIFY inclusionChanged void saveToJson(QJsonObject &json)
void inclusionChanged(bool inclusion)
bool loadFromJson(const QJsonObject &json, bool required, QString &errorString)
bool inclusion(void) const
void setInclusion(bool inclusion)
const QGCFencePolygon & operator=(const QGCFencePolygon &other)