The list of preplanned map areas available obtained from an offline map task. More...
Header: | #include <PreplannedMapAreaListModel.h> |
Since: | Esri::ArcGISRuntime 100.2 |
Inherits: | QAbstractListModel and Esri::ArcGISRuntime::Iterable |
Public Types
enum | PreplannedMapAreaRoles { ItemTitleRole, ItemIdRole, ItemDescriptionRole, ItemThumbnailUrlRole } |
Public Functions
virtual | ~PreplannedMapAreaListModel() override |
bool | contains(Esri::ArcGISRuntime::PreplannedMapArea *area) const |
Esri::ArcGISRuntime::PreplannedMapArea * | first() const |
int | indexOf(Esri::ArcGISRuntime::PreplannedMapArea *area) const |
bool | isEmpty() const |
Esri::ArcGISRuntime::PreplannedMapArea * | last() const |
Reimplemented Public Functions
virtual Esri::ArcGISRuntime::PreplannedMapArea * | at(int index) const override |
virtual QVariant | data(const QModelIndex &index, int role = Qt::DisplayRole) const override |
Detailed Description
The model returns data for the following roles:
Role | Type | Description | PreplannedMapAreaRoles |
---|---|---|---|
itemTitle | QString | The title of the portal item for the map area. | ItemTitleRole |
itemId | QString | The Id of the porta item for the map area. | ItemIdRole |
itemDescription | QString | The description of the portal item for the map area. | ItemDescriptionRole |
itemThumbnailUrl | QUrl | The thumbnail of the portal item as a local file URL. | ItemThumbnailUrlRole |
See also OfflineMapTask, PreplannedMapArea, and PortalItem.
Member Type Documentation
enum PreplannedMapAreaListModel::PreplannedMapAreaRoles
This enum specifies the custom roles which can be used with PreplannedMapAreaListModel::data.
Constant | Value | Description |
---|---|---|
Esri::ArcGISRuntime::PreplannedMapAreaListModel::ItemTitleRole | Qt::UserRole + 1 | The title of the portal item for the map area. |
Esri::ArcGISRuntime::PreplannedMapAreaListModel::ItemIdRole | Qt::UserRole + 2 | The Id of the porta item for the map area. |
Esri::ArcGISRuntime::PreplannedMapAreaListModel::ItemDescriptionRole | Qt::UserRole + 3 | The description of the portal item for the map area. |
Esri::ArcGISRuntime::PreplannedMapAreaListModel::ItemThumbnailUrlRole | Qt::UserRole + 4 | The thumbnail of the portal item as a local file URL. |
Member Function Documentation
[override virtual]
PreplannedMapAreaListModel::~PreplannedMapAreaListModel ()
Destructor.
[override virtual]
Esri::ArcGISRuntime::PreplannedMapArea *PreplannedMapAreaListModel::at(int index) const
Returns the map area at the specified index.
bool PreplannedMapAreaListModel::contains(Esri::ArcGISRuntime::PreplannedMapArea *area) const
Returns true
if the provided area is in the list model.
[override virtual]
QVariant PreplannedMapAreaListModel::data(const QModelIndex &index, int role = Qt::DisplayRole) const
Reimplements: QAbstractItemModel::data(const QModelIndex &index, int role) const.
Returns the data stored under the given role for the map area referred to by the index.
- index. The index in the model for which to return data.
- role. The role for which to return data.
Esri::ArcGISRuntime::PreplannedMapArea *PreplannedMapAreaListModel::first() const
Returns the first map area in the list model.
int PreplannedMapAreaListModel::indexOf (Esri::ArcGISRuntime::PreplannedMapArea *area) const
Returns the index of the provided area in the list model.
bool PreplannedMapAreaListModel::isEmpty () const
Returns true
if this list model is empty.
Esri::ArcGISRuntime::PreplannedMapArea *PreplannedMapAreaListModel::last() const
Returns the last map area in the list model.