24#include <QStandardPaths>
26#include "geomaps/VAC.h"
78 [[nodiscard]]
bool isEmpty()
const {
return m_vacs.isEmpty(); }
84 [[nodiscard]] QList<GeoMaps::VAC>
vacs();
131 Q_INVOKABLE
void remove(
const QString& name);
141 [[nodiscard]] Q_INVOKABLE QString
rename(
const QString& oldName,
const QString& newName);
154 [[nodiscard]] Q_INVOKABLE QVector<GeoMaps::VAC>
vacsByDistance(
const QGeoCoordinate& position,
const QString& filter);
165 [[nodiscard]] Q_INVOKABLE QVector<GeoMaps::VAC>
vacs4Point(
const QGeoCoordinate& position);
194 QString absolutePathForVac(
const QString& name);
196 QVector<GeoMaps::VAC> m_vacs;
197 QString m_vacDirectory {QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + u
"/VAC"_s};
198 QFile m_dataFile {QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + u
"/VAC.data"_s};
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.
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 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.