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 QGCMapCircle & operator= (const QGCMapCircle &other)
void saveToJson (QJsonObject &json)
bool loadFromJson (const QJsonObject &json, QString &errorString)
bool dirty (void) const
QGeoCoordinate center (void) const
Fact * radius (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)

◆ QGCMapCircle() [2/4]

◆ 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 center(), clockwiseRotation(), radius(), and showRotation().

◆ QGCMapCircle() [4/4]

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

Definition at line 29 of file QGCMapCircle.cc.

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

Member Function Documentation

◆ center()

QGeoCoordinate QGCMapCircle::center ( void ) const
inline

◆ centerChanged

void QGCMapCircle::centerChanged ( QGeoCoordinate center)
signal

References center().

Referenced by QGCMapCircle(), and setCenter().

◆ clockwiseRotation()

bool QGCMapCircle::clockwiseRotation ( void ) const
inline

◆ clockwiseRotationChanged

void QGCMapCircle::clockwiseRotationChanged ( bool clockwiseRotation)
signal

◆ dirty()

bool QGCMapCircle::dirty ( void ) const
inline

Definition at line 43 of file QGCMapCircle.h.

Referenced by dirtyChanged(), QGCMapCircle(), and setDirty().

◆ dirtyChanged

void QGCMapCircle::dirtyChanged ( bool dirty)
signal

References dirty().

Referenced by QGCMapCircle(), and setDirty().

◆ interactive()

bool QGCMapCircle::interactive ( void ) const
inline

Definition at line 46 of file QGCMapCircle.h.

Referenced by interactiveChanged(), QGCMapCircle(), and setInteractive().

◆ interactiveChanged

void QGCMapCircle::interactiveChanged ( bool interactive)
signal

References interactive().

Referenced by QGCMapCircle(), and 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(), jsonCircleKey, GeoJsonHelper::loadGeoCoordinate(), setCenter(), and JsonParsing::validateKeys().

Referenced by QGCFenceCircle::loadFromJson().

◆ operator=()

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

Definition at line 42 of file QGCMapCircle.cc.

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

Referenced by QGCFenceCircle::operator=().

◆ radius()

Fact * QGCMapCircle::radius ( void )
inline

◆ 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, 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(), operator=(), and QGCMapCircle().

◆ setClockwiseRotation()

void QGCMapCircle::setClockwiseRotation ( bool clockwiseRotation)

Definition at line 145 of file QGCMapCircle.cc.

References clockwiseRotation(), and clockwiseRotationChanged().

Referenced by QGCMapCircle().

◆ setDirty()

void QGCMapCircle::setDirty ( bool dirty)

Definition at line 60 of file QGCMapCircle.cc.

References dirty(), and dirtyChanged().

Referenced by operator=(), QGCMapCircle(), and setCenter().

◆ setInteractive()

void QGCMapCircle::setInteractive ( bool interactive)

Definition at line 129 of file QGCMapCircle.cc.

References interactive(), and interactiveChanged().

Referenced by GeoFenceController::addInclusionCircle(), and QGCMapCircle().

◆ setShowRotation()

void QGCMapCircle::setShowRotation ( bool showRotation)

Definition at line 137 of file QGCMapCircle.cc.

References showRotation(), and showRotationChanged().

Referenced by QGCMapCircle().

◆ showRotation()

bool QGCMapCircle::showRotation ( void ) const
inline

Definition at line 47 of file QGCMapCircle.h.

Referenced by QGCMapCircle(), QGCMapCircle(), setShowRotation(), and showRotationChanged().

◆ showRotationChanged

void QGCMapCircle::showRotationChanged ( bool showRotation)
signal

References showRotation().

Referenced by QGCMapCircle(), and setShowRotation().

Member Data Documentation

◆ jsonCircleKey

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: