PreplannedMapAreaListModel Class

  • PreplannedMapAreaListModel
  • class Esri::ArcGISRuntime::PreplannedMapAreaListModel

    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:

    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

    [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.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.