24#include <QStandardPaths>
26#include "GlobalObject.h"
27#include "dataManagement/Downloadable_MultiFile.h"
28#include "dataManagement/Downloadable_SingleFile.h"
29#include "units/ByteSize.h"
32namespace DataManagement {
184 [[nodiscard]] QString
whatsNew()
const {
return m_whatsNew; }
212 Q_INVOKABLE QString
import(
const QString& fileName,
const QString& newName);
229 Q_INVOKABLE QString
importOpenAir(
const QString& fileName,
const QString& newName);
265 void cleanDataDirectory();
270 void onItemFileChanged();
275 void updateDataItemListAndWhatsNew();
285 bool m_appUpdateRequired {
false};
288 QString m_dataDirectory {QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) +
"/aviation_maps"};
295 DataManagement::Downloadable_SingleFile m_mapList { QUrl(QStringLiteral(
"https://enroute-data.akaflieg-freiburg.de/enroute-GeoJSONv003/maps.json")), QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) +
"/maps.json" };
Manages the list of geographic maps.
Units::ByteSize whatsNewHash
Hash of the current "what's new" message.
DataManagement::Downloadable_MultiFile * baseMaps
Downloadable_MultiFile that holds all base maps.
void deferredInitialization() override
Non-constructor initialization.
DataManagement::Downloadable_MultiFile * terrainMaps
Downloadable_MultiFile that holds all terrain maps.
bool appUpdateRequired
Indiates that the app needs to be updated.
DataManagement::Downloadable_MultiFile * aviationMaps
Downloadable_MultiFile that holds all aviation maps.
DataManagement::Downloadable_MultiFile * databases
Downloadable_MultiFile that holds all databases.
Q_INVOKABLE QString importOpenAir(const QString &fileName, const QString &newName)
Import airspace data into the library of locally installed maps.
DataManagement::Downloadable_MultiFile * items
Downloadable_MultiFile that holds all data items.
DataManagement::Downloadable_MultiFile * baseMapsRaster
Downloadable_MultiFile that holds all base maps in raster format.
DataManagement::Downloadable_MultiFile * baseMapsVector
Downloadable_MultiFile that holds all base maps in vector format.
void whatsNewChanged()
Notifier signal.
DataManagement::Downloadable_MultiFile * mapsAndData
Downloadable_MultiFile that holds all the map sets and databases.
DataManager(QObject *parent=nullptr)
Standard constructor.
DataManagement::Downloadable_SingleFile * mapList
Downloadable_SingleFile that holds the list of all maps and databases.
DataManagement::Downloadable_MultiFile * mapSets
Downloadable_MultiFile that holds all map sets.
void error(const QString &message)
Error message for user.
void updateRemoteDataItemListIfOutdated()
Triggers an update of the list of remotely available data items.
QString whatsNew
Current "what's new" message.
void appUpdateRequiredChanged()
Group of closely related downloadable items.
@ SingleUpdate
Update children that are updatable.
static Q_INVOKABLE DataManagement::DataManager * dataManager()
Pointer to appplication-wide static GeoMaps::DataManager instance.
GlobalObject(QObject *parent=nullptr)
Standard constructor.
Convenience class for size_t.