Settings.h 1.23 KB
Newer Older
1 2
#pragma once

3 4
#include <QGeoCoordinate>

5 6
#include "MissionController.h"
#include "PlanMasterController.h"
7 8
#include "Vehicle.h"

9 10 11 12 13 14
namespace WaypointManager {

class Settings
{
public:
    Settings();
15

16 17 18 19 20
    bool valid() const;

    void setHomePosition(const QGeoCoordinate &c);
    void setMissionController(MissionController *controller);
    void setMasterController(PlanMasterController *controller);
21 22 23 24 25 26
    void setIsFlyView(bool isFlyView);
    void setArrivalReturnSpeed(double speed);
    void setFlightSpeed(double speed);
    void setAltitude(double altitude);

    const QGeoCoordinate &homePosition() const;
27 28 29
    QGeoCoordinate &homePosition();
    MissionController *missionController() const;
    PlanMasterController *masterController() const;
30 31 32 33 34 35 36
    Vehicle *vehicle() const;
    bool isFlyView() const;
    double arrivalReturnSpeed() const;
    double flightSpeed() const;
    double altitude() const;

private:
37 38 39 40 41 42 43
    QGeoCoordinate          _homePosition;
    MissionController      *_missionController;
    PlanMasterController   *_masterController;
    bool                    _isFlyView;
    double                  _arrivalReturnSpeed;
    double                  _flightSpeed;
    double                  _altitude;
44

45 46 47
};

} // namespace WaypointManager