QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCFenceCircle.h
Go to the documentation of this file.
1#pragma once
2
3#include "QGCMapCircle.h"
4
8{
9 Q_OBJECT
10
11public:
12 QGCFenceCircle(QObject* parent = nullptr);
13 QGCFenceCircle(const QGeoCoordinate& center, double radius, bool inclusion, QObject* parent = nullptr);
14 QGCFenceCircle(const QGCFenceCircle& other, QObject* parent = nullptr);
15
16 const QGCFenceCircle& operator=(const QGCFenceCircle& other);
17
18 Q_PROPERTY(bool inclusion READ inclusion WRITE setInclusion NOTIFY inclusionChanged)
19
20
22 void saveToJson(QJsonObject& json);
23
28 bool loadFromJson(const QJsonObject& json, 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 QGCFenceCircle class provides a cicle used by GeoFence support.
const QGCFenceCircle & operator=(const QGCFenceCircle &other)
void setInclusion(bool inclusion)
void inclusionChanged(bool inclusion)
bool loadFromJson(const QJsonObject &json, QString &errorString)
bool inclusion(void) const
void saveToJson(QJsonObject &json)
The QGCMapCircle represents a circular area which can be displayed on a Map control.
Fact * radius(void)
QGeoCoordinate center(void) const