#pragma once #include #include #include "GenericWaypointManager.h" #include "QmlObjectListModel.h" #include "Settings.h" #include "AreaInterface.h" namespace WaypointManager { typedef GenericWaypointManager ManagerBase; //! //! \brief The DefaultManager class is used to manage SimpleMissionItems. //! //! @note The \class QmlObjectList returned by \fn missionItems doesn't contain a MissionSettingsItem. //! This list is supposed to be used for display purposes only. class DefaultManager : public ManagerBase { public: DefaultManager() = delete; DefaultManager(Settings &settings, AreaInterface &interface); void clear() override; virtual bool update() override; virtual bool next() override; virtual bool previous() override; virtual bool reset() override; protected: bool _insertMissionItem(const QGeoCoordinate &c, size_t index, QmlObjectListModel &list, bool doUpdate); bool _insertMissionItem(const QGeoCoordinate &c, size_t index, bool doUpdate); bool _calcShortestPath(const QGeoCoordinate &start, const QGeoCoordinate &destination, QVector &path); AreaInterface *_areaInterface; private: bool _worker(); }; } // namespace WaypointManager