WimaServiceAreaData.h 1.21 KB
Newer Older
Valentin Platzgummer's avatar
Valentin Platzgummer committed
1 2 3
#pragma once

#include <QObject>
4
#include "QGeoCoordinate"
Valentin Platzgummer's avatar
Valentin Platzgummer committed
5 6

#include "WimaAreaData.h"
7 8 9
#include "WimaServiceArea.h"


Valentin Platzgummer's avatar
Valentin Platzgummer committed
10 11 12 13 14 15

class WimaServiceAreaData : public WimaAreaData
{
    Q_OBJECT

public:
16 17 18 19 20
    WimaServiceAreaData(QObject *parent = nullptr);
    WimaServiceAreaData(const WimaServiceAreaData &other, QObject *parent = nullptr);
    WimaServiceAreaData(const WimaServiceArea &other, QObject *parent = nullptr);
    WimaServiceAreaData& operator=(const WimaServiceAreaData &otherData);
    WimaServiceAreaData& operator=(const WimaServiceArea &otherArea);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
21 22

    const QGeoCoordinate &takeOffPosition() const;
23 24
    const QGeoCoordinate &landPosition() const;

25 26
    QString type() const;

27
    static const char* typeString;
Valentin Platzgummer's avatar
Valentin Platzgummer committed
28 29 30

signals:
    void takeOffPositionChanged(const QGeoCoordinate& other);
31
    void landPositionChanged(const QGeoCoordinate& other);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
32 33 34

public slots:
    void setTakeOffPosition(const QGeoCoordinate& newCoordinate);
35
    void setLandPosition(const QGeoCoordinate& newCoordinate);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
36

37 38 39
protected:
    void assign(const WimaServiceAreaData &other);
    void assign(const WimaServiceArea &other);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
40 41 42 43 44 45
private:
    // see WimaServieArea.h for explanation
    QGeoCoordinate      _takeOffPosition;
    QGeoCoordinate      _landPosition;
};