10 , _showRotation (false)
11 , _clockwiseRotation(true)
21 , _interactive (false)
22 , _showRotation (showRotation)
23 , _clockwiseRotation(clockwiseRotation)
32 , _center (other._center)
34 , _interactive (false)
35 , _showRotation (other._showRotation)
36 , _clockwiseRotation(other._clockwiseRotation)
51void QGCMapCircle::_init(
void)
54 _radius.
setMetaData(_nameToMetaDataMap[_radiusFactName]);
62 if (_dirty !=
dirty) {
71 QJsonObject circleObject;
74 circleObject.insert(_jsonCenterKey, jsonValue);
75 circleObject.insert(_jsonRadiusKey, _radius.
rawValue().toDouble());
84 QList<JsonParsing::KeyValidateInfo> circleKeyInfo = {
93 QList<JsonParsing::KeyValidateInfo> circleObjectKeyInfo = {
94 { _jsonCenterKey, QJsonValue::Array,
true },
95 { _jsonRadiusKey, QJsonValue::Double,
true },
106 _radius.
setRawValue(circleObject[_jsonRadiusKey].toDouble());
108 _interactive =
false;
109 _showRotation =
false;
110 _clockwiseRotation =
true;
117 if (newCenter != _center) {
124void QGCMapCircle::_setDirty(
void)
void setMetaData(FactMetaData *metaData, bool setDefaultFromMetaData=false)
void rawValueChanged(const QVariant &value)
void setRawValue(const QVariant &value)
QVariant rawValue() const
Value after translation.
The QGCMapCircle represents a circular area which can be displayed on a Map control.
void dirtyChanged(bool dirty)
void setInteractive(bool interactive)
void interactiveChanged(bool interactive)
bool clockwiseRotation(void) const
void setClockwiseRotation(bool clockwiseRotation)
QGCMapCircle(QObject *parent=nullptr)
static constexpr const char * jsonCircleKey
void clockwiseRotationChanged(bool clockwiseRotation)
bool interactive(void) const
void saveToJson(QJsonObject &json)
void setShowRotation(bool showRotation)
void centerChanged(QGeoCoordinate center)
bool showRotation(void) const
void showRotationChanged(bool showRotation)
void setDirty(bool dirty)
void setCenter(QGeoCoordinate newCenter)
const QGCMapCircle & operator=(const QGCMapCircle &other)
QGeoCoordinate center(void) const
bool loadFromJson(const QJsonObject &json, QString &errorString)
bool loadGeoCoordinate(const QJsonValue &jsonValue, bool altitudeRequired, QGeoCoordinate &coordinate, QString &errorString)
void saveGeoCoordinate(const QGeoCoordinate &coordinate, bool writeAltitude, QJsonValue &jsonValue)
Saves a QGeoCoordinate as [lat, lon, alt] array (QGC plan format).
bool validateKeys(const QJsonObject &jsonObject, const QList< KeyValidateInfo > &keyInfo, QString &errorString)
Validates that all required keys are present and that listed keys have the expected type.