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


Public Types | |
| enum | Roles { NameRole = Qt::UserRole , PathRole = Qt::UserRole+1 , DirRole = Qt::UserRole+2 , ServerDirectoryRole = Qt::UserRole+3 , TimeRole = Qt::UserRole+4 , VersionRole = Qt::UserRole+5 , ByteSizeRole = Qt::UserRole+6 , ProviderUriRole = Qt::UserRole+7 , DescriptionRole = Qt::UserRole+8 , SizeRole = Qt::UserRole+9 , MapRole = Qt::UserRole+10 } |
Public Slots | |
| void | listDownloaded (const MapProvider &provider, QNetworkReply *) |
| void | reload () |
Signals | |
| void | loadingChanged () |
Public Member Functions | |
| AvailableMapsModel () | |
| ~AvailableMapsModel () override | |
| Q_INVOKABLE int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| Q_INVOKABLE int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| Q_INVOKABLE QModelIndex | index (int row, int column=0, const QModelIndex &parent=QModelIndex()) const override |
| Q_INVOKABLE QModelIndex | parent (const QModelIndex &index) 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 QVariant | map (const QModelIndex &index) const |
| Q_INVOKABLE QVariant | timeOfMap (QStringList path) |
| Q_INVOKABLE QObject * | mapByPath (QStringList path) |
| bool | isLoading () const |
| QString | getFetchError () const |
Properties | |
| bool | loading |
| QString | fetchError |
Tree model with maps available by configured providers (see Settings::GetMapProviders). Every map provider have to expose list of maps by json. Json format example:
[
{
"version" : 10,
"timestamp" : 1480801927,
"name" : "Czech Republic",
"directory" : "europe/czech-republic-10-20161203",
"size" : 622036876,
"map" : "europe/czech-republic"
},
{
"dir" : "europe",
"name" : "Europe"
}
]
| osmscout::AvailableMapsModel::AvailableMapsModel | ( | ) |
|
override |
|
override |
|
override |
|
override |
|
inline |
|
override |
|
inline |
|
slot |
|
signal |
| Q_INVOKABLE QVariant osmscout::AvailableMapsModel::map | ( | const QModelIndex & | index | ) | const |
| Q_INVOKABLE QObject * osmscout::AvailableMapsModel::mapByPath | ( | QStringList | path | ) |
|
override |
|
slot |
|
override |
|
override |
| Q_INVOKABLE QVariant osmscout::AvailableMapsModel::timeOfMap | ( | QStringList | path | ) |
Generation time of map with given path. Null if don't exists in available maps. It may be used for detection if there is some update available.
| path |
|
read |
|
read |