|
libosmscout 1.1.1
|
#include <libosmscout-client-qt/include/osmscoutclientqt/MapDownloadsModel.h>


Public Types | |
| enum | Roles { MapNameRole = Qt::UserRole , TargetDirectoryRole = Qt::UserRole+1 , ProgressRole = Qt::UserRole+2 , ProgressDescriptionRole = Qt::UserRole+3 , ErrorStringRole = Qt::UserRole+4 } |
Public Slots | |
| void | onDownloadJobsChanged () |
| void | onDownloadProgress () |
Signals | |
| void | mapDownloadFails (QString message) |
Public Member Functions | |
| MapDownloadsModel (QObject *parent=Q_NULLPTR) | |
| ~MapDownloadsModel () override=default | |
| Q_INVOKABLE int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| Q_INVOKABLE QVariant | data (const QModelIndex &index, int role) const override |
| QHash< int, QByteArray > | roleNames () const override |
| Q_INVOKABLE Qt::ItemFlags | flags (const QModelIndex &index) const override |
| Q_INVOKABLE void | cancel (int row) |
| Q_INVOKABLE QString | suggestedDirectory (QObject *map, QString rootDirectory="") |
| Q_INVOKABLE void | downloadMap (QObject *map, QString dir) |
| Q_INVOKABLE QStringList | getLookupDirectories () |
| Q_INVOKABLE double | getFreeSpace (QString dir) |
QML list model with currently downloaded maps. It provide methods (invocable from QML) for starting new map download.
| osmscout::MapDownloadsModel::MapDownloadsModel | ( | QObject * | parent = Q_NULLPTR | ) |
|
overridedefault |
| Q_INVOKABLE void osmscout::MapDownloadsModel::cancel | ( | int | row | ) |
|
override |
| Q_INVOKABLE void osmscout::MapDownloadsModel::downloadMap | ( | QObject * | map, |
| QString | dir ) |
|
override |
| Q_INVOKABLE double osmscout::MapDownloadsModel::getFreeSpace | ( | QString | dir | ) |
| Q_INVOKABLE QStringList osmscout::MapDownloadsModel::getLookupDirectories | ( | ) |
|
signal |
|
slot |
|
slot |
|
override |
|
override |
| Q_INVOKABLE QString osmscout::MapDownloadsModel::suggestedDirectory | ( | QObject * | map, |
| QString | rootDirectory = "" ) |