Skip To Content ArcGIS for Developers Sign In Dashboard

PreplannedMapAreaListModel Class

(Esri::ArcGISRuntime::PreplannedMapAreaListModel)

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

Additional Inherited Members

Detailed Description

The list of preplanned map areas available obtained from an offline map task.

The model returns data for the following roles:

RoleTypeDescriptionPreplannedMapAreaRoles
itemTitleQStringThe title of the portal item for the map area.ItemTitleRole
itemIdQStringThe Id of the porta item for the map area.ItemIdRole
itemDescriptionQStringThe description of the portal item for the map area.ItemDescriptionRole
itemThumbnailUrlQUrlThe 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.

ConstantValueDescription
Esri::ArcGISRuntime::PreplannedMapAreaListModel::ItemTitleRoleQt::UserRole + 1The title of the portal item for the map area.
Esri::ArcGISRuntime::PreplannedMapAreaListModel::ItemIdRoleQt::UserRole + 2The Id of the porta item for the map area.
Esri::ArcGISRuntime::PreplannedMapAreaListModel::ItemDescriptionRoleQt::UserRole + 3The description of the portal item for the map area.
Esri::ArcGISRuntime::PreplannedMapAreaListModel::ItemThumbnailUrlRoleQt::UserRole + 4The 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.


Feedback on this topic?