Represents an immutable list of portal items. More...
Header: | #include <ImmutablePortalItemListModel.h> |
Since: | Esri::ArcGISRuntime 100.3 |
Inherits: | QAbstractListModel and Esri::ArcGISRuntime::Iterable |
Public Functions
virtual | ~ImmutablePortalItemListModel() override |
bool | contains(Esri::ArcGISRuntime::PortalItem *portalItem) const |
Esri::ArcGISRuntime::PortalItem * | first() const |
int | indexOf(Esri::ArcGISRuntime::PortalItem *portalItem) const |
bool | isEmpty() const |
Esri::ArcGISRuntime::PortalItem * | last() const |
Reimplemented Public Functions
virtual Esri::ArcGISRuntime::PortalItem * | at(int index) const override |
virtual QVariant | data(const QModelIndex &index, int role = Qt::DisplayRole) const override |
virtual int | size() const override |
Signals
void | errorOccurred(const Esri::ArcGISRuntime::Error &error) |
Detailed Description
A PortalItem is a unit of content in the Portal.
The model returns data for the following roles:
Role | Type | Description | PortalItemListModel::PortalItemRoles |
---|---|---|---|
url | QUrl | The URL for the resource represented by the item. | PortalItemUrlRole |
itemId | QString | The ID of the item. | PortalItemItemIdRole |
access | PortalAccess | The level of access to the item. | PortalItemAccessRole |
averageRating | int | The average rating of the item. | PortalItemAverageRatingRole |
commentCount | int | The number of comments for the item. | PortalItemCommentCountRole |
commentsEnabled | bool | Whether comments are allowed on the item. | PortalItemCommentsEnabledRole |
culture | QString | The item locale information (language and country). | PortalItemCultureRole |
folderId | QString | The ID of the folder containing the item. | PortalItemFolderIdRole |
name | QString | The name of this item. | PortalItemNameRole |
owner | QString | The username of the user who owns the item. | PortalItemOwnerRole |
ratingCount | int | The number of ratings received by the item. | PortalItemRatingCountRole |
serviceUrl | int | The service URL for the item. | PortalItemServiceUrlRole |
size | qint64 | The size of the item in bytes. | PortalItemSizeRole |
type | PortalItemType | The type of the item. | PortalItemTypeRole |
typeKeywords | QStringList | A set of keywords that further describes the type of the item. | PortalItemTypeKeywordsRole |
typeName | QString | The name of the type of this item. | PortalItemTypeNameRole |
viewCount | int | The number of times this item has been viewed. | PortalItemViewCountRole |
description | QString | The item description. | PortalItemDescriptionRole |
extent | Envelope | The bounding rectangle of the item. | PortalItemExtentRole |
snippet | QString | The short summary description of the item. | PortalItemSnippetRole |
title | QString | The title of the item. | PortalItemTitleRole |
accessInformation | QString | The access information on the source of the item. | PortalItemAccessInformationRole |
tags | QStringList | The user-defined tags that describe the item. | PortalItemTagsRole |
created | QDateTime | The creation date of the item. | PortalItemCreatedRole |
modified | QDateTime | The date the item was last modified. | PortalItemModifiedRole |
spatialReference | SpatialReference | The spatial reference of the item. | PortalItemSpatialReferenceRole |
thumbnailUrl | QUrl | The thumbnail of the item as a local file URL. | PortalItemThumbnailUrlRole |
See also Portal, PortalUser, and PortalItem.
Member Function Documentation
[override virtual]
ImmutablePortalItemListModel::~ImmutablePortalItemListModel ()
Destructor.
[override virtual]
Esri::ArcGISRuntime::PortalItem *ImmutablePortalItemListModel::at(int index) const
Returns the PortalItem at the specified index.
bool ImmutablePortalItemListModel::contains(Esri::ArcGISRuntime::PortalItem *portalItem ) const
Returns whether the list model contains the specified portalItem.
[override virtual]
QVariant ImmutablePortalItemListModel::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 portal item referred to by the index.
- index. The index in the model for which to return data.
- role. The role for which to return data.
[signal]
void ImmutablePortalItemListModel::errorOccurred (const Esri::ArcGISRuntime::Error &error)
Signal emitted when an error occurs.
- error - Details about the error.
Esri::ArcGISRuntime::PortalItem *ImmutablePortalItemListModel::first() const
Returns the first PortalItem in the list model.
int ImmutablePortalItemListModel::indexOf (Esri::ArcGISRuntime::PortalItem *portalItem ) const
Returns the index of the PortalItem portalItem.
bool ImmutablePortalItemListModel::isEmpty () const
Returns whether the list model contains no items.
Esri::ArcGISRuntime::PortalItem *ImmutablePortalItemListModel::last() const
Returns the last PortalItem in the list model.
[override virtual]
int ImmutablePortalItemListModel::size() const
Returns the number of items contained in the list model.