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 ()
 
QmlObjectListModel *polygons READ polygons CONSTANT (QmlObjectListModel *circles READ circles CONSTANT) 1(QGeoCoordinate breachReturnPoint READ breachReturnPoint WRITE setBreachReturnPoint NOTIFY breachReturnPointChanged) 1(Fact *breachReturnAltitude READ breachReturnAltitude CONSTANT) 1(double paramCircularFence READ paramCircularFence NOTIFY paramCircularFenceChanged) 1 void addInclusionPolygon(QGeoCoordinate topLeft
 
void addInclusionCircle (QGeoCoordinate topLeft, QGeoCoordinate bottomRight)
 
void deletePolygon (int index)
 
void deleteCircle (int index)
 
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 ()
 
PlanMasterController *masterController READ masterController CONSTANT (bool supported READ supported NOTIFY supportedChanged) 1(bool containsItems READ containsItems NOTIFY containsItemsChanged) 1(bool syncInProgress READ syncInProgress NOTIFY syncInProgressChanged) 1(bool dirty READ dirty WRITE setDirty NOTIFY dirtyChanged) PlanMasterController *masterController(void)
 < true: Elemement is non-empty
 

Public Attributes

QmlObjectListModel *polygons READ polygons QGeoCoordinate bottomRight
 

Additional Inherited Members

- Protected Attributes inherited from PlanElementController
PlanMasterController_masterController
 
bool _flyView
 

Detailed Description

Definition at line 18 of file GeoFenceController.h.

Constructor & Destructor Documentation

◆ GeoFenceController()

◆ ~GeoFenceController()

GeoFenceController::~GeoFenceController ( )

Definition at line 43 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 415 of file GeoFenceController.cc.

References QmlObjectListModel::append(), bottomRight, clearAllInteractive(), and QGCMapCircle::setInteractive().

◆ breachReturnAltitude()

Fact * GeoFenceController::breachReturnAltitude ( void  )
inline

Definition at line 60 of file GeoFenceController.h.

◆ breachReturnPoint()

QGeoCoordinate GeoFenceController::breachReturnPoint ( void  ) const
inline

Definition at line 79 of file GeoFenceController.h.

Referenced by setBreachReturnPoint().

◆ breachReturnPointChanged

void GeoFenceController::breachReturnPointChanged ( QGeoCoordinate  breachReturnPoint)
signal

◆ circles()

QmlObjectListModel * GeoFenceController::circles ( void  )
inline

Definition at line 78 of file GeoFenceController.h.

◆ clearAllInteractive()

void GeoFenceController::clearAllInteractive ( void  )

Clears the interactive bit from all fence items.

Definition at line 456 of file GeoFenceController.cc.

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

Referenced by addInclusionCircle().

◆ CONSTANT()

QmlObjectListModel *polygons READ polygons GeoFenceController::CONSTANT ( QmlObjectListModel *circles READ circles  CONSTANT)

Add a new inclusion polygon to the fence

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

◆ containsItems()

bool GeoFenceController::containsItems ( void  ) const
finalvirtual

Implements PlanElementController.

Definition at line 351 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 446 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 436 of file GeoFenceController.cc.

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

◆ dirty()

bool GeoFenceController::dirty ( void  ) const
finalvirtual

Implements PlanElementController.

Definition at line 256 of file GeoFenceController.cc.

Referenced by setDirty().

◆ editorQmlChanged

void GeoFenceController::editorQmlChanged ( QString  editorQml)
signal

◆ isEmpty()

bool GeoFenceController::isEmpty ( void  ) const

Definition at line 570 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 77 of file GeoFenceController.h.

◆ removeAll()

void GeoFenceController::removeAll ( void  )
finalvirtual

Removes all from controller only.

Implements PlanElementController.

Definition at line 208 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 215 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 238 of file GeoFenceController.cc.

References PlanElementController::_masterController, PlanMasterController::offline(), GeoFenceManager::sendToVehicle(), setDirty(), and syncInProgress().

◆ setBreachReturnPoint()

void GeoFenceController::setBreachReturnPoint ( const QGeoCoordinate &  breachReturnPoint)

Definition at line 64 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 466 of file GeoFenceController.cc.

References Vehicle::capabilityBits().

Referenced by PlanMasterController::removeAllFromVehicle().

◆ syncInProgress()

bool GeoFenceController::syncInProgress ( void  ) const
finalvirtual

Member Data Documentation

◆ bottomRight

QmlObjectListModel *polygons READ polygons QGeoCoordinate GeoFenceController::bottomRight

Definition at line 41 of file GeoFenceController.h.

Referenced by addInclusionCircle().


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