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)
 
FactbreachReturnAltitude (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
 
QmlObjectListModelpolygons (void)
 
QmlObjectListModelcircles (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 ()
 true: unsaved/sent changes are present, false: no changes since last save/send
 
PlanMasterControllermasterController (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 416 of file GeoFenceController.cc.

References QmlObjectListModel::append(), 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 383 of file GeoFenceController.cc.

References QmlObjectListModel::append(), 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

Definition at line 76 of file GeoFenceController.h.

Referenced by setBreachReturnPoint().

◆ breachReturnPointChanged

void GeoFenceController::breachReturnPointChanged ( QGeoCoordinate  breachReturnPoint)
signal

◆ circles()

QmlObjectListModel * GeoFenceController::circles ( void  )
inline

Definition at line 75 of file GeoFenceController.h.

◆ clearAllInteractive()

void GeoFenceController::clearAllInteractive ( void  )

Clears the interactive bit from all fence items.

Definition at line 457 of file GeoFenceController.cc.

References QmlObjectListModel::count(), and QmlObjectListModel::value().

Referenced by addInclusionCircle(), and addInclusionPolygon().

◆ containsItems()

bool GeoFenceController::containsItems ( void  ) const
finalvirtual

Implements PlanElementController.

Definition at line 352 of file GeoFenceController.cc.

References QmlObjectListModel::count().

Referenced by PlanMasterController::containsItems().

◆ deleteCircle()

void GeoFenceController::deleteCircle ( int  index)

Deletes the specified circle from the circle list

Parameters
indexIndex of circle to delete

Definition at line 447 of file GeoFenceController.cc.

References QmlObjectListModel::count(), and QmlObjectListModel::removeAt().

◆ deletePolygon()

void GeoFenceController::deletePolygon ( int  index)

Deletes the specified polygon from the polygon list

Parameters
indexIndex of polygon to delete

Definition at line 437 of file GeoFenceController.cc.

References QmlObjectListModel::count(), and QmlObjectListModel::removeAt().

◆ dirty()

bool GeoFenceController::dirty ( void  ) const
finalvirtual

Implements PlanElementController.

Definition at line 257 of file GeoFenceController.cc.

Referenced by setDirty().

◆ editorQmlChanged

void GeoFenceController::editorQmlChanged ( QString  editorQml)
signal

◆ isEmpty()

bool GeoFenceController::isEmpty ( void  ) const

Definition at line 571 of file GeoFenceController.cc.

References QmlObjectListModel::count().

Referenced by PlanMasterController::isEmpty().

◆ load()

◆ loadComplete

void GeoFenceController::loadComplete ( void  )
signal

◆ loadFromVehicle()

void GeoFenceController::loadFromVehicle ( void  )
finalvirtual

◆ paramCircularFence()

◆ paramCircularFenceChanged

void GeoFenceController::paramCircularFenceChanged ( void  )
signal

◆ polygons()

QmlObjectListModel * GeoFenceController::polygons ( void  )
inline

Definition at line 74 of file GeoFenceController.h.

◆ removeAll()

void GeoFenceController::removeAll ( void  )
finalvirtual

Removes all from controller only.

Implements PlanElementController.

Definition at line 209 of file GeoFenceController.cc.

References QmlObjectListModel::clearAndDeleteContents(), and setBreachReturnPoint().

Referenced by load(), and PlanMasterController::removeAll().

◆ 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, PlanMasterController::offline(), GeoFenceManager::removeAll(), and syncInProgress().

Referenced by PlanMasterController::removeAllFromVehicle().

◆ save()

◆ 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, PlanMasterController::offline(), GeoFenceManager::sendToVehicle(), 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()

◆ showPlanFromManagerVehicle()

bool GeoFenceController::showPlanFromManagerVehicle ( void  )
finalvirtual

◆ start()

void GeoFenceController::start ( bool  flyView)
finalvirtual

◆ supported()

bool GeoFenceController::supported ( void  ) const
finalvirtual

true: controller is waiting for the current load to complete

Implements PlanElementController.

Definition at line 467 of file GeoFenceController.cc.

References Vehicle::capabilityBits().

Referenced by PlanMasterController::removeAllFromVehicle().

◆ syncInProgress()

bool GeoFenceController::syncInProgress ( void  ) const
finalvirtual

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