24#include <QStandardPaths>
27#include "geomaps/VAC.h"
94 [[nodiscard]]
bool isEmpty()
const {
return m_vacs.isEmpty() && m_collectionVacs.isEmpty(); }
100 [[nodiscard]] QList<GeoMaps::VAC>
vacs();
162 Q_INVOKABLE
void remove(
const QString& name);
172 [[nodiscard]] Q_INVOKABLE QString
rename(
const QString& oldName,
const QString& newName);
185 [[nodiscard]] Q_INVOKABLE QVector<GeoMaps::VAC>
vacsByDistance(
const QGeoCoordinate& position,
const QString& filter);
196 [[nodiscard]] Q_INVOKABLE QVector<GeoMaps::VAC>
vacs4Point(
const QGeoCoordinate& position);
222 void updateCollections();
230 QString absolutePathForVac(
const QString& name);
232 QVector<GeoMaps::VAC> m_vacs;
233 QVector<GeoMaps::VAC> m_collectionVacs;
234 QString m_vacDirectory {QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + u
"/VAC"_s};
235 QString m_cacheDirectory {QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + u
"/VAC"_s};
236 QFile m_dataFile {QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + u
"/VAC.data"_s};
240 QTimer m_updateCollectionsTimer;
Q_INVOKABLE QVector< GeoMaps::VAC > vacsByDistance(const QGeoCoordinate &position, const QString &filter)
List of all VACs installed.
Q_INVOKABLE void clear()
Removes all VACs.
Q_INVOKABLE GeoMaps::VAC get(const QString &name)
Obtain VACs from the library.
Q_INVOKABLE void remove(const QString &name)
Remove one VACs.
bool isEmpty() const
Getter function for property of the same name.
void dataChanged()
Notifier signal.
Q_INVOKABLE QString importVAC(GeoMaps::VAC vac)
Import VAC.
~VACLibrary() override
Destructor.
VACLibrary(QObject *parent=nullptr)
Constructor.
QList< GeoMaps::VAC > vacs
List of all VACs installed.
bool isEmpty
True if library is empty.
Q_INVOKABLE QVector< GeoMaps::VAC > vacs4Point(const QGeoCoordinate &position)
List of all VACs that contain a given point.
QList< GeoMaps::VAC > vacs()
Getter function for property of the same name.
Q_INVOKABLE GeoMaps::VAC materialize(const GeoMaps::VAC &vac)
Obtain a VAC whose fileName points to a raster image file.
Q_INVOKABLE QString rename(const QString &oldName, const QString &newName)
Rename a VACs.
Q_INVOKABLE QString importTripKit(const QString &fileName)
Import trip kit.
void importTripKitStatus(double percent)
Progress report when importing a trip kit.
bool hasManuallyImported
True if the library contains manually imported charts.