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)
 
bool dirty READ dirty WRITE setDirty NOTIFY dirtyChanged (QGeoCoordinate center READ center WRITE setCenter NOTIFY centerChanged) 1(Fact *radius READ radius CONSTANT) 1(bool interactive READ interactive WRITE setInteractive NOTIFY interactiveChanged) 1(bool showRotation READ showRotation WRITE setShowRotation NOTIFY showRotationChanged) 1(bool clockwiseRotation READ clockwiseRotation WRITE setClockwiseRotation NOTIFY clockwiseRotationChanged) 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 10 of file QGCMapCircle.h.

Constructor & Destructor Documentation

◆ QGCMapCircle() [1/4]

QGCMapCircle::QGCMapCircle ( QObject *  parent = nullptr)

Definition at line 5 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 15 of file QGCMapCircle.cc.

References radius().

◆ QGCMapCircle() [4/4]

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

Definition at line 28 of file QGCMapCircle.cc.

Member Function Documentation

◆ center()

QGeoCoordinate QGCMapCircle::center ( void  ) const
inline

Definition at line 43 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 47 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 42 of file QGCMapCircle.h.

Referenced by setDirty().

◆ dirtyChanged [1/2]

void QGCMapCircle::dirtyChanged ( bool  dirty)
signal

◆ dirtyChanged() [2/2]

bool dirty READ dirty WRITE setDirty NOTIFY QGCMapCircle::dirtyChanged ( QGeoCoordinate center READ center WRITE setCenter NOTIFY  centerChanged) &

Saves the polygon to the json object.

Parameters
jsonJson object to save to

Referenced by setDirty().

◆ interactive()

bool QGCMapCircle::interactive ( void  ) const
inline

Definition at line 45 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 79 of file QGCMapCircle.cc.

References center(), errorString, jsonCircleKey, JsonHelper::loadGeoCoordinate(), setCenter(), and JsonHelper::validateKeys().

Referenced by QGCFenceCircle::loadFromJson().

◆ operator=()

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

Definition at line 41 of file QGCMapCircle.cc.

References setCenter(), and setDirty().

Referenced by QGCFenceCircle::operator=().

◆ radius()

Fact * QGCMapCircle::radius ( void  )
inline

Definition at line 44 of file QGCMapCircle.h.

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

◆ setCenter()

void QGCMapCircle::setCenter ( QGeoCoordinate  newCenter)

Definition at line 114 of file QGCMapCircle.cc.

References centerChanged(), and setDirty().

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

◆ setClockwiseRotation()

void QGCMapCircle::setClockwiseRotation ( bool  clockwiseRotation)

Definition at line 144 of file QGCMapCircle.cc.

References clockwiseRotation(), and clockwiseRotationChanged().

◆ setDirty()

void QGCMapCircle::setDirty ( bool  dirty)

Definition at line 59 of file QGCMapCircle.cc.

References dirty(), and dirtyChanged().

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

◆ setInteractive()

void QGCMapCircle::setInteractive ( bool  interactive)

Definition at line 128 of file QGCMapCircle.cc.

References interactive(), and interactiveChanged().

Referenced by GeoFenceController::addInclusionCircle().

◆ setShowRotation()

void QGCMapCircle::setShowRotation ( bool  showRotation)

Definition at line 136 of file QGCMapCircle.cc.

References showRotation(), and showRotationChanged().

◆ showRotation()

bool QGCMapCircle::showRotation ( void  ) const
inline

Definition at line 46 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 55 of file QGCMapCircle.h.

Referenced by loadFromJson().


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