AirspaceFlightPlanProvider.h 2.02 KB
Newer Older
Gus Grubba's avatar
Gus Grubba committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/****************************************************************************
 *
 *   (c) 2017 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

#pragma once

/**
 * @file AirspaceFlightPlanProvider.h
 * Create and maintain a flight plan
 */

#include <QObject>
18
#include <QDateTime>
Gus Grubba's avatar
Gus Grubba committed
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

class MissionController;

//-----------------------------------------------------------------------------
class AirspaceFlightPlanProvider : public QObject
{
    Q_OBJECT
public:

    enum PermitStatus {
        PermitUnknown = 0,
        PermitPending,
        PermitAccepted,
        PermitRejected,
    };

    Q_ENUM(PermitStatus)

37 38
    AirspaceFlightPlanProvider                  (QObject *parent = nullptr);
    virtual ~AirspaceFlightPlanProvider         () {}
Gus Grubba's avatar
Gus Grubba committed
39

40 41 42
    Q_PROPERTY(PermitStatus  flightPermitStatus     READ flightPermitStatus                             NOTIFY flightPermitStatusChanged)   ///< State of flight permission
    Q_PROPERTY(QDateTime     flightStartTime        READ flightStartTime    WRITE  setFlightStartTime   NOTIFY flightStartTimeChanged)      ///< Start of flight
    Q_PROPERTY(QDateTime     flightEndTime          READ flightEndTime      WRITE  setFlightEndTime     NOTIFY flightEndTimeChanged)        ///< End of flight
Gus Grubba's avatar
Gus Grubba committed
43

44 45 46 47 48 49 50
    virtual PermitStatus    flightPermitStatus  () const { return PermitUnknown; }
    virtual QDateTime       flightStartTime     () const = 0;
    virtual QDateTime       flightEndTime       () const = 0;

    virtual void            setFlightStartTime  (QDateTime start) = 0;
    virtual void            setFlightEndTime    (QDateTime end) = 0;
    virtual void            createFlightPlan    (MissionController* missionController) = 0;
Gus Grubba's avatar
Gus Grubba committed
51 52 53


signals:
54 55 56
    void flightPermitStatusChanged              ();
    void flightStartTimeChanged                 ();
    void flightEndTimeChanged                   ();
Gus Grubba's avatar
Gus Grubba committed
57
};