47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
#ifndef MAPDATA_H
|
|
#define MAPDATA_H
|
|
|
|
#include "waypoint.h"
|
|
#include <QObject>
|
|
|
|
class MapData : public QObject {
|
|
Q_OBJECT
|
|
public:
|
|
explicit MapData(QObject *parent = nullptr);
|
|
|
|
Q_PROPERTY(QList<std::unique_ptr<Waypoint>> waypoints READ waypoints WRITE
|
|
setWaypoints NOTIFY waypointsChanged FINAL)
|
|
Q_PROPERTY(int zoomLevel READ zoomLevel WRITE setZoomLevel NOTIFY
|
|
zoomLevelChanged FINAL)
|
|
Q_PROPERTY(int gpsUpdateInterval READ gpsUpdateInterval WRITE
|
|
setGpsUpdateInterval NOTIFY gpsUpdateIntervalChanged FINAL)
|
|
Q_PROPERTY(int defaultZoomLevel READ defaultZoomLevel NOTIFY
|
|
defaultZoomLevelChanged FINAL)
|
|
|
|
QList<std::unique_ptr<Waypoint>> waypoints() const;
|
|
void setWaypoints(const QList<std::unique_ptr<Waypoint>> &newWaypoints);
|
|
|
|
int zoomLevel() const;
|
|
void setZoomLevel(int newZoomLevel);
|
|
|
|
int gpsUpdateInterval() const;
|
|
void setGpsUpdateInterval(int newGpsUpdateInterval);
|
|
|
|
int defaultZoomLevel() const;
|
|
void setDefaultZoomLevel(int newDefaultZoomLevel);
|
|
|
|
signals:
|
|
void waypointsChanged();
|
|
void zoomLevelChanged();
|
|
void gpsUpdateIntervalChanged();
|
|
void defaultZoomLevelChanged();
|
|
|
|
private:
|
|
QList<std::unique_ptr<Waypoint>> m_waypoints;
|
|
int m_zoomLevel;
|
|
int m_gpsUpdateInterval;
|
|
int m_defaultZoomLevel;
|
|
};
|
|
|
|
#endif // MAPDATA_H
|