Folders are used to organize content in a portal. The list of PortalFolder objects is retrieved by calling fetchContent and if the operation is succesful, this model is returned by the portalUser's folders method.
Multilevel folders are not supported in a portal.
The model returns data for the following roles:
Example:
Retrieve the model representing a user's folders:
// fetch the portal user's folders QMap<QString, QString> folderTitles; // folderId and folderTitle auto fetchContentFuture = portalUser.fetchContentAsync().then([&portalUser, &folderTitles]() { PortalFolderListModel* folders = portalUser.folders(); Q_CHECK_PTR(folders); for (auto&& i : *folders) { PortalFolder folder = i; folderTitles[folder.folderId()] = folder.title(); qDebug() << folder.title(); } });Member Function Documentation
[override virtual noexcept]
PortalFolderListModel::~PortalFolderListModel()
Destructor.
[override virtual]
Esri::ArcGISRuntime::PortalFolder PortalFolderListModel::at(int index) const
Returns the PortalFolder at the specified index.
bool PortalFolderListModel::contains(const Esri::ArcGISRuntime::PortalFolder &portalFolder) constReturns true
if the list model contains the PortalFolder portalFolder.
[override virtual]
QVariant PortalFolderListModel::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 folder referred to by the index.
[signal]
void PortalFolderListModel::errorOccurred(const Esri::ArcGISRuntime::Error &error)
Signal emitted when an error occurs.
Returns the first PortalFolder in the list model.
int PortalFolderListModel::indexOf(const Esri::ArcGISRuntime::PortalFolder &portalFolder) constReturns the index of the PortalFolder portalFolder.
bool PortalFolderListModel::isEmpty() constReturns whether the list model is empty (contains no PortalFolder objects).
[signal, since Esri::ArcGISRuntime 100.15]
void PortalFolderListModel::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 PortalFolderListModel::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::PortalFolder PortalFolderListModel::last() constReturns the last PortalFolder in the list model.
[override virtual]
int PortalFolderListModel::size() const
Returns the number of PortalFolder objects 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