1#ifndef OSMSCOUT_CLIENT_QT_INSTALLEDMAPSMODEL_H
2#define OSMSCOUT_CLIENT_QT_INSTALLEDMAPSMODEL_H
26#include <QAbstractListModel>
62 Q_INVOKABLE
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
63 Q_INVOKABLE QVariant
data(const QModelIndex &index,
int role) const override;
65 Q_INVOKABLE Qt::ItemFlags
flags(const QModelIndex &index) const override;
73 Q_INVOKABLE
bool removeRows(
int row,
int count, const QModelIndex &parent = QModelIndex()) override;
82 Q_INVOKABLE QVariant
timeOfMap(const QStringList& path);
85 QList<MapDirectory> dirs;
86 MapManagerRef mapManager;
88 Slot<
std::vector<
std::filesystem::path>> databaseListChangedSlot {
89 [
this](
const std::vector<std::filesystem::path> &paths) {
#define OSMSCOUT_CLIENT_QT_API
Definition ClientQtImportExport.h:45
Q_INVOKABLE bool deleteMap(int row)
Q_INVOKABLE QVariant data(const QModelIndex &index, int role) const override
void onDatabaseListChanged()
virtual ~InstalledMapsModel()
void databaseListChanged(QList< QDir > databaseDirectories)
QHash< int, QByteArray > roleNames() const override
Q_INVOKABLE bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) override
Q_INVOKABLE QVariant timeOfMap(const QStringList &path)
Roles
Definition InstalledMapsModel.h:51
@ TimeRole
Definition InstalledMapsModel.h:55
@ ByteSizeRole
Definition InstalledMapsModel.h:56
@ PathRole
Definition InstalledMapsModel.h:53
@ DirectoryRole
Definition InstalledMapsModel.h:54
@ SizeRole
Definition InstalledMapsModel.h:57
@ VersionRole
Definition InstalledMapsModel.h:58
@ NameRole
Definition InstalledMapsModel.h:52
Q_INVOKABLE int rowCount(const QModelIndex &parent=QModelIndex()) const override
Q_INVOKABLE Qt::ItemFlags flags(const QModelIndex &index) const override
OSMSCOUT_CLIENT_QT_API QList< QDir > PathVectorToQDirList(const std::vector< std::filesystem::path > &paths)