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

#include <GeoFenceController.h>

Inheritance diagram for GeoFenceController:
Collaboration diagram for GeoFenceController:

Signals

void breachReturnPointChanged (QGeoCoordinate breachReturnPoint)
void editorQmlChanged (QString editorQml)
void loadComplete (void)
void paramCircularFenceChanged (void)
Signals inherited from PlanElementController
void supportedChanged (bool supported)
void containsItemsChanged ()
void syncInProgressChanged (bool syncInProgress)
void dirtyChanged (bool dirty)
void sendComplete (void)
void removeAllComplete (void)

Public Member Functions

 GeoFenceController (PlanMasterController *masterController, QObject *parent=nullptr)
 ~GeoFenceController ()
Q_INVOKABLE void addInclusionPolygon (QGeoCoordinate topLeft, QGeoCoordinate bottomRight)
Q_INVOKABLE void addInclusionCircle (QGeoCoordinate topLeft, QGeoCoordinate bottomRight)
Q_INVOKABLE void deletePolygon (int index)
Q_INVOKABLE void deleteCircle (int index)
Q_INVOKABLE void clearAllInteractive (void)
 Clears the interactive bit from all fence items.
double paramCircularFence (void)
Fact * breachReturnAltitude (void)
bool supported (void) const final
 true: controller is waiting for the current load to complete
void start (bool flyView) final
 Should be called immediately upon Component.onCompleted.
void save (QJsonObject &json) final
bool load (const QJsonObject &json, QString &errorString) final
void loadFromVehicle (void) final
void sendToVehicle (void) final
void removeAll (void) final
 Removes all from controller only.
void removeAllFromVehicle (void) final
bool syncInProgress (void) const final
bool dirty (void) const final
void setDirty (bool dirty) final
bool containsItems (void) const final
bool showPlanFromManagerVehicle (void) final
QmlObjectListModel * polygons (void)
QmlObjectListModel * circles (void)
QGeoCoordinate breachReturnPoint (void) const
void setBreachReturnPoint (const QGeoCoordinate &breachReturnPoint)
bool isEmpty (void) const
Public Member Functions inherited from PlanElementController
 PlanElementController (PlanMasterController *masterController, QObject *parent=nullptr)
 ~PlanElementController ()
PlanMasterController * masterController (void)

Additional Inherited Members

Protected Attributes inherited from PlanElementController
PlanMasterController * _masterController
bool _flyView

Detailed Description

Definition at line 15 of file GeoFenceController.h.

Constructor & Destructor Documentation

◆ GeoFenceController()

◆ ~GeoFenceController()

GeoFenceController::~GeoFenceController ( )

Definition at line 44 of file GeoFenceController.cc.

Member Function Documentation

◆ addInclusionCircle()

void GeoFenceController::addInclusionCircle ( QGeoCoordinate topLeft,
QGeoCoordinate bottomRight )

Add a new inclusion circle to the fence

Parameters
topLeftTop left coordinate or map viewport
bottomRightBottom right left coordinate or map viewport

Definition at line 411 of file GeoFenceController.cc.

References clearAllInteractive(), and QGCMapCircle::setInteractive().

◆ addInclusionPolygon()

void GeoFenceController::addInclusionPolygon ( QGeoCoordinate topLeft,
QGeoCoordinate bottomRight )

Add a new inclusion polygon to the fence

Parameters
topLeftTop left coordinate or map viewport
bottomRightBottom right left coordinate or map viewport

Definition at line 378 of file GeoFenceController.cc.

References QGCMapPolygon::appendVertex(), clearAllInteractive(), and QGCMapPolygon::setInteractive().

◆ breachReturnAltitude()

Fact * GeoFenceController::breachReturnAltitude ( void )
inline

Definition at line 57 of file GeoFenceController.h.

◆ breachReturnPoint()

QGeoCoordinate GeoFenceController::breachReturnPoint ( void ) const
inline

◆ breachReturnPointChanged

void GeoFenceController::breachReturnPointChanged ( QGeoCoordinate breachReturnPoint)
signal

◆ circles()

QmlObjectListModel * GeoFenceController::circles ( void )
inline

Definition at line 75 of file GeoFenceController.h.

Referenced by paramCircularFenceChanged().

◆ clearAllInteractive()

void GeoFenceController::clearAllInteractive ( void )

Clears the interactive bit from all fence items.

Definition at line 452 of file GeoFenceController.cc.

Referenced by addInclusionCircle(), and addInclusionPolygon().

◆ containsItems()

bool GeoFenceController::containsItems ( void ) const
finalvirtual

Implements PlanElementController.

Definition at line 347 of file GeoFenceController.cc.

◆ deleteCircle()

void GeoFenceController::deleteCircle ( int index)

Deletes the specified circle from the circle list

Parameters
indexIndex of circle to delete

Definition at line 442 of file GeoFenceController.cc.

◆ deletePolygon()

void GeoFenceController::deletePolygon ( int index)

Deletes the specified polygon from the polygon list

Parameters
indexIndex of polygon to delete

Definition at line 432 of file GeoFenceController.cc.

◆ dirty()

bool GeoFenceController::dirty ( void ) const
finalvirtual

Implements PlanElementController.

Definition at line 257 of file GeoFenceController.cc.

Referenced by paramCircularFenceChanged(), and setDirty().

◆ editorQmlChanged

void GeoFenceController::editorQmlChanged ( QString editorQml)
signal

◆ isEmpty()

bool GeoFenceController::isEmpty ( void ) const

Definition at line 566 of file GeoFenceController.cc.

◆ load()

bool GeoFenceController::load ( const QJsonObject & json,
QString & errorString )
finalvirtual

◆ loadComplete

void GeoFenceController::loadComplete ( void )
signal

◆ loadFromVehicle()

void GeoFenceController::loadFromVehicle ( void )
finalvirtual

◆ paramCircularFence()

double GeoFenceController::paramCircularFence ( void )

Definition at line 470 of file GeoFenceController.cc.

References ParameterManager::defaultComponentId.

◆ paramCircularFenceChanged

void GeoFenceController::paramCircularFenceChanged ( void )
signal

◆ polygons()

QmlObjectListModel * GeoFenceController::polygons ( void )
inline

Definition at line 74 of file GeoFenceController.h.

Referenced by paramCircularFenceChanged().

◆ removeAll()

void GeoFenceController::removeAll ( void )
finalvirtual

Removes all from controller only.

Implements PlanElementController.

Definition at line 209 of file GeoFenceController.cc.

References setBreachReturnPoint().

Referenced by load().

◆ removeAllFromVehicle()

void GeoFenceController::removeAllFromVehicle ( void )
finalvirtual

Removes all from vehicle and controller Signals removeAllComplete when done

Implements PlanElementController.

Definition at line 216 of file GeoFenceController.cc.

References PlanElementController::_masterController, and syncInProgress().

◆ save()

void GeoFenceController::save ( QJsonObject & json)
finalvirtual

◆ sendToVehicle()

void GeoFenceController::sendToVehicle ( void )
finalvirtual

Sends the current plan element to the vehicle Signals sendComplete when done

Implements PlanElementController.

Definition at line 239 of file GeoFenceController.cc.

References PlanElementController::_masterController, setDirty(), and syncInProgress().

◆ setBreachReturnPoint()

void GeoFenceController::setBreachReturnPoint ( const QGeoCoordinate & breachReturnPoint)

Definition at line 65 of file GeoFenceController.cc.

References breachReturnPoint(), breachReturnPointChanged(), and setDirty().

Referenced by removeAll().

◆ setDirty()

void GeoFenceController::setDirty ( bool dirty)
finalvirtual

◆ showPlanFromManagerVehicle()

bool GeoFenceController::showPlanFromManagerVehicle ( void )
finalvirtual

◆ start()

void GeoFenceController::start ( bool flyView)
finalvirtual

Should be called immediately upon Component.onCompleted.

Reimplemented from PlanElementController.

Definition at line 49 of file GeoFenceController.cc.

References PlanElementController::_masterController, PlanMasterController::managerVehicleChanged(), and PlanElementController::start().

◆ supported()

bool GeoFenceController::supported ( void ) const
finalvirtual

true: controller is waiting for the current load to complete

Implements PlanElementController.

Definition at line 462 of file GeoFenceController.cc.

◆ syncInProgress()

bool GeoFenceController::syncInProgress ( void ) const
finalvirtual

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