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
8{
9 Q_OBJECT
10
11public:
12 QGCFencePolygon(bool inclusion, QObject* parent = nullptr);
13 QGCFencePolygon(const QGCFencePolygon& other, QObject* parent = nullptr);
14
15 const QGCFencePolygon& operator=(const QGCFencePolygon& other);
16
17 Q_PROPERTY(bool inclusion READ inclusion WRITE setInclusion NOTIFY inclusionChanged)
18
19
21 void saveToJson(QJsonObject& json);
22
28 bool loadFromJson(const QJsonObject& json, bool required, QString& errorString);
29
30 // Property methods
31
32 bool inclusion (void) const { return _inclusion; }
33 void setInclusion (bool inclusion);
34
35signals:
37
38private slots:
39 void _setDirty(void);
40
41private:
42 void _init(void);
43
44 bool _inclusion;
45
46 static constexpr int _jsonCurrentVersion = 1;
47
48 static constexpr const char* _jsonInclusionKey = "inclusion";
49};
QString errorString
The QGCFencePolygon class provides a polygon used by GeoFence support.
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)
The QGCMapPolygon class provides a polygon which can be displayed on a map using a map visuals contro...