Represents a list of portal items. More...
Public Types enum PortalItemRoles { PortalItemUrlRole, PortalItemItemIdRole, PortalItemAccessRole, PortalItemAverageRatingRole, PortalItemCommentCountRole, â¦, PortalItemTermsOfUseRole } Public Functions virtual ~PortalItemListModel() 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)(since Esri::ArcGISRuntime 100.15)
void itemAdded(int index) (since Esri::ArcGISRuntime 100.15)
void itemRemoved(int index) Detailed Description
A PortalItem is a unit of content in the Portal. This type is populated by starting an operation to retrieve content and then can be accessed after the operation is complete. For example, the list of items can be retrieved by: querying the portal (such as with PortalQueryParametersForItems) or by fetching the featuredItems or by fetching the items belonging to a user.
The model returns data for the following roles:
Example: Accessing roles from a PortalItemListModel from within a QML delegate:
Text { anchors { fill: parent margins: 10 } text: title // access the title role of the model color: "white" elide: Text.ElideRight wrapMode: Text.Wrap horizontalAlignment: Text.AlignHCenter }
See also Portal, PortalUser, and PortalItem.
Member Type Documentation enum PortalItemListModel::PortalItemRolesThis enum specifies the custom roles which can be used with PortalItemListModel::data and ImmutablePortalItemListModel::data.
Constant Value DescriptionEsri::ArcGISRuntime::PortalItemListModel::PortalItemUrlRole
Qt::UserRole + 1
The URL for the resource represented by the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemItemIdRole
Qt::UserRole + 2
The ID of the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemAccessRole
Qt::UserRole + 3
The level of access to the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemAverageRatingRole
Qt::UserRole + 5
The average rating of the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemCommentCountRole
Qt::UserRole + 6
The number of comments for the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemCommentsEnabledRole
Qt::UserRole + 7
Whether comments are allowed on the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemCultureRole
Qt::UserRole + 8
The item locale information (language and country). Esri::ArcGISRuntime::PortalItemListModel::PortalItemFolderIdRole
Qt::UserRole + 9
The ID of the folder containing the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemNameRole
Qt::UserRole + 10
The name of this item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemOwnerRole
Qt::UserRole + 11
The username of the user who owns the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemRatingCountRole
Qt::UserRole + 12
The number of ratings received by the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemServiceUrlRole
Qt::UserRole + 13
The service URL for the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemSizeRole
Qt::UserRole + 14
The size of the item in bytes. Esri::ArcGISRuntime::PortalItemListModel::PortalItemTypeRole
Qt::UserRole + 15
The type of the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemTypeKeywordsRole
Qt::UserRole + 16
A set of keywords that further describes the type of the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemTypeNameRole
Qt::UserRole + 17
The name of the type of this item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemViewCountRole
Qt::UserRole + 18
The number of times this item has been viewed. Esri::ArcGISRuntime::PortalItemListModel::PortalItemDescriptionRole
Qt::UserRole + 19
The item description. Esri::ArcGISRuntime::PortalItemListModel::PortalItemExtentRole
Qt::UserRole + 20
The bounding rectangle of the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemSnippetRole
Qt::UserRole + 21
The short summary description of the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemTitleRole
Qt::UserRole + 22
The title of the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemAccessInformationRole
Qt::UserRole + 23
The access information on the source of the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemTagsRole
Qt::UserRole + 24
The user-defined tags that describe the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemCreatedRole
Qt::UserRole + 25
The creation date of the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemModifiedRole
Qt::UserRole + 26
The date the item was last modified. Esri::ArcGISRuntime::PortalItemListModel::PortalItemSpatialReferenceRole
Qt::UserRole + 27
The spatial reference of the item. Esri::ArcGISRuntime::PortalItemListModel::PortalItemThumbnailUrlRole
Qt::UserRole + 28
The thumbnail of the item as a local file URL. Esri::ArcGISRuntime::PortalItemListModel::PortalItemTermsOfUseRole
Qt::UserRole + 29
The terms of use of the item. Member Function Documentation [override virtual noexcept]
PortalItemListModel::~PortalItemListModel()
Destructor.
[override virtual]
Esri::ArcGISRuntime::PortalItem *PortalItemListModel::at(int index) const
Returns the PortalItem at the specified index.
bool PortalItemListModel::contains(Esri::ArcGISRuntime::PortalItem *portalItem) constReturns whether the list model contains the specified portalItem.
[override virtual]
QVariant PortalItemListModel::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.
[signal]
void PortalItemListModel::errorOccurred(const Esri::ArcGISRuntime::Error &error)
Signal emitted when an error occurs.
Returns the first PortalItem in the list model.
int PortalItemListModel::indexOf(Esri::ArcGISRuntime::PortalItem *portalItem) constReturns the index of the PortalItem portalItem.
bool PortalItemListModel::isEmpty() constReturns whether the list model contains no items.
[signal, since Esri::ArcGISRuntime 100.15]
void PortalItemListModel::itemAdded(int index)
Signal emitted when an item is added to the list model.
index is the index of the added item.
This function was introduced in Esri::ArcGISRuntime 100.15.
[signal, since Esri::ArcGISRuntime 100.15]
void PortalItemListModel::itemRemoved(int index)
Signal emitted when an item is removed from the list model.
index is the index of the removed item.
This function was introduced in Esri::ArcGISRuntime 100.15.
Esri::ArcGISRuntime::PortalItem *PortalItemListModel::last() constReturns the last PortalItem in the list model.
[override virtual]
int PortalItemListModel::size() const
Returns the number of items contained in the list model.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4