PreplannedMapAreaListModel Class
The list of preplanned map areas available obtained from an offline map task. More...
Header: | #include <PreplannedMapAreaListModel> |
Since: | Esri::ArcGISRuntime 100.2 |
Inherits: | QAbstractListModel and Iterable<PreplannedMapArea *> |
Public Types
enum | PreplannedMapAreaRoles { ItemTitleRole, ItemIdRole, ItemDescriptionRole, ItemThumbnailUrlRole } |
Public Functions
~PreplannedMapAreaListModel() | |
PreplannedMapArea * | at(int index) const |
bool | contains(PreplannedMapArea *area) const |
PreplannedMapArea * | first() const |
int | indexOf(PreplannedMapArea *area) const |
bool | isEmpty() const |
PreplannedMapArea * | last() const |
Reimplemented Public Functions
virtual QVariant | data(const QModelIndex &index, int role = Qt::DisplayRole) const |
- 4 public functions inherited from QAbstractListModel
- 8 public functions inherited from Esri::ArcGISRuntime::Iterable
- 39 public functions inherited from QAbstractItemModel
- 31 public functions inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 2 public slots inherited from QAbstractItemModel
- 1 public slot inherited from QObject
- 18 signals inherited from QAbstractItemModel
- 2 signals inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 19 protected functions inherited from QAbstractItemModel
- 9 protected functions inherited from QObject
- 1 protected slot inherited from QAbstractItemModel
- 2 protected variables inherited from QObject
Detailed Description
The list of preplanned map areas available obtained from an offline map task.
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
PreplannedMapAreaListModel::~PreplannedMapAreaListModel()
Destructor.
PreplannedMapArea *PreplannedMapAreaListModel::at(int index) const
Returns the map area at the specified index.
bool PreplannedMapAreaListModel::contains(PreplannedMapArea *area) const
Returns true
if the provided area is in the list model.
[virtual]
QVariant PreplannedMapAreaListModel::data(const QModelIndex &index, int role = Qt::DisplayRole) const
Reimplemented from QAbstractItemModel::data().
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.
PreplannedMapArea *PreplannedMapAreaListModel::first() const
Returns the first map area in the list model.
int PreplannedMapAreaListModel::indexOf(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.
PreplannedMapArea *PreplannedMapAreaListModel::last() const
Returns the last map area in the list model.