initial commit to split repos
This commit is contained in:
46
mvc/data/mapdata.h
Normal file
46
mvc/data/mapdata.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user