QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCMapCircle Class Reference

The QGCMapCircle represents a circular area which can be displayed on a Map control. More...

#include <QGCMapCircle.h>

+ Inheritance diagram for QGCMapCircle:
+ Collaboration diagram for QGCMapCircle:

Signals

void dirtyChanged (bool dirty)
 
void centerChanged (QGeoCoordinate center)
 
void interactiveChanged (bool interactive)
 
void showRotationChanged (bool showRotation)
 
void clockwiseRotationChanged (bool clockwiseRotation)
 

Public Member Functions

 QGCMapCircle (QObject *parent=nullptr)
 
 QGCMapCircle (const QGeoCoordinate &center, double radius, QObject *parent=nullptr)
 
 QGCMapCircle (const QGeoCoordinate &center, double radius, bool showRotation, bool clockwiseRotation, QObject *parent=nullptr)
 
 QGCMapCircle (const QGCMapCircle &other, QObject *parent=nullptr)
 
const QGCMapCircleoperator= (const QGCMapCircle &other)
 
void saveToJson (QJsonObject &json)
 
bool loadFromJson (const QJsonObject &json, QString &errorString)
 
bool dirty (void) const
 
QGeoCoordinate center (void) const
 
Factradius (void)
 
bool interactive (void) const
 
bool showRotation (void) const
 
bool clockwiseRotation (void) const
 
void setDirty (bool dirty)
 
void setCenter (QGeoCoordinate newCenter)
 
void setInteractive (bool interactive)
 
void setShowRotation (bool showRotation)
 
void setClockwiseRotation (bool clockwiseRotation)
 

Static Public Attributes

static constexpr const char * jsonCircleKey = "circle"
 

Detailed Description

The QGCMapCircle represents a circular area which can be displayed on a Map control.

Definition at line 11 of file QGCMapCircle.h.

Constructor & Destructor Documentation

◆ QGCMapCircle() [1/4]

QGCMapCircle::QGCMapCircle ( QObject *  parent = nullptr)

Definition at line 6 of file QGCMapCircle.cc.

◆ QGCMapCircle() [2/4]

QGCMapCircle::QGCMapCircle ( const QGeoCoordinate &  center,
double  radius,
QObject *  parent = nullptr 
)

◆ QGCMapCircle() [3/4]

QGCMapCircle::QGCMapCircle ( const QGeoCoordinate &  center,
double  radius,
bool  showRotation,
bool  clockwiseRotation,
QObject *  parent = nullptr 
)

Definition at line 16 of file QGCMapCircle.cc.

References radius(), and Fact::setRawValue().

◆ QGCMapCircle() [4/4]

QGCMapCircle::QGCMapCircle ( const QGCMapCircle other,
QObject *  parent = nullptr 
)

Definition at line 29 of file QGCMapCircle.cc.

References Fact::rawValue(), and Fact::setRawValue().

Member Function Documentation

◆ center()

QGeoCoordinate QGCMapCircle::center ( void  ) const
inline

Definition at line 44 of file QGCMapCircle.h.

Referenced by loadFromJson(), and GeoFenceManager::sendToVehicle().

◆ centerChanged

void QGCMapCircle::centerChanged ( QGeoCoordinate  center)
signal

Referenced by setCenter().

◆ clockwiseRotation()

bool QGCMapCircle::clockwiseRotation ( void  ) const
inline

Definition at line 48 of file QGCMapCircle.h.

Referenced by setClockwiseRotation().

◆ clockwiseRotationChanged

void QGCMapCircle::clockwiseRotationChanged ( bool  clockwiseRotation)
signal

Referenced by setClockwiseRotation().

◆ dirty()

bool QGCMapCircle::dirty ( void  ) const
inline

Definition at line 43 of file QGCMapCircle.h.

Referenced by setDirty().

◆ dirtyChanged

void QGCMapCircle::dirtyChanged ( bool  dirty)
signal

Referenced by setDirty().

◆ interactive()

bool QGCMapCircle::interactive ( void  ) const
inline

Definition at line 46 of file QGCMapCircle.h.

Referenced by setInteractive().

◆ interactiveChanged

void QGCMapCircle::interactiveChanged ( bool  interactive)
signal

Referenced by setInteractive().

◆ loadFromJson()

bool QGCMapCircle::loadFromJson ( const QJsonObject &  json,
QString &  errorString 
)

Load a circle from json

Parameters
jsonJson object to load from
errorStringError string if return is false
Returns
true: success, false: failure (errorString set)

Definition at line 80 of file QGCMapCircle.cc.

References center(), errorString, jsonCircleKey, GeoJsonHelper::loadGeoCoordinate(), setCenter(), Fact::setRawValue(), and JsonParsing::validateKeys().

Referenced by QGCFenceCircle::loadFromJson().

◆ operator=()

const QGCMapCircle & QGCMapCircle::operator= ( const QGCMapCircle other)

Definition at line 42 of file QGCMapCircle.cc.

References Fact::rawValue(), setCenter(), setDirty(), and Fact::setRawValue().

Referenced by QGCFenceCircle::operator=().

◆ radius()

Fact * QGCMapCircle::radius ( void  )
inline

Definition at line 45 of file QGCMapCircle.h.

Referenced by QGCMapCircle(), and GeoFenceManager::sendToVehicle().

◆ saveToJson()

void QGCMapCircle::saveToJson ( QJsonObject &  json)

Saves the polygon to the json object.

Parameters
jsonJson object to save to

Definition at line 68 of file QGCMapCircle.cc.

References jsonCircleKey, Fact::rawValue(), and GeoJsonHelper::saveGeoCoordinate().

Referenced by QGCFenceCircle::saveToJson().

◆ setCenter()

void QGCMapCircle::setCenter ( QGeoCoordinate  newCenter)

Definition at line 115 of file QGCMapCircle.cc.

References centerChanged(), and setDirty().

Referenced by loadFromJson(), and operator=().

◆ setClockwiseRotation()

void QGCMapCircle::setClockwiseRotation ( bool  clockwiseRotation)

Definition at line 145 of file QGCMapCircle.cc.

References clockwiseRotation(), and clockwiseRotationChanged().

◆ setDirty()

void QGCMapCircle::setDirty ( bool  dirty)

Definition at line 60 of file QGCMapCircle.cc.

References dirty(), and dirtyChanged().

Referenced by operator=(), setCenter(), and GeoFenceController::setDirty().

◆ setInteractive()

void QGCMapCircle::setInteractive ( bool  interactive)

Definition at line 129 of file QGCMapCircle.cc.

References interactive(), and interactiveChanged().

Referenced by GeoFenceController::addInclusionCircle().

◆ setShowRotation()

void QGCMapCircle::setShowRotation ( bool  showRotation)

Definition at line 137 of file QGCMapCircle.cc.

References showRotation(), and showRotationChanged().

◆ showRotation()

bool QGCMapCircle::showRotation ( void  ) const
inline

Definition at line 47 of file QGCMapCircle.h.

Referenced by setShowRotation().

◆ showRotationChanged

void QGCMapCircle::showRotationChanged ( bool  showRotation)
signal

Referenced by setShowRotation().

Member Data Documentation

◆ jsonCircleKey

constexpr const char* QGCMapCircle::jsonCircleKey = "circle"
staticconstexpr

Definition at line 56 of file QGCMapCircle.h.

Referenced by loadFromJson(), and saveToJson().


The documentation for this class was generated from the following files: