A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-portalgrouplistmodel.html below:

PortalGroupListModel Class | ArcGIS Maps SDK for Qt

  • PortalGroupListModel
  • class Esri::ArcGISRuntime::PortalGroupListModel

    Represents a particular set of groups in a portal. More...

    Public Types enum PortalGroupRoles { PortalGroupAccessRole, PortalGroupAdminsRole, PortalGroupCreatedRole, PortalGroupGroupDescriptionRole, PortalGroupGroupIdRole, …, PortalGroupViewOnlyRole } Public Functions virtual ~PortalGroupListModel() override bool contains(Esri::ArcGISRuntime::PortalGroup *portalGroup) const Esri::ArcGISRuntime::PortalGroup * first() const int indexOf(Esri::ArcGISRuntime::PortalGroup *portalGroup) const bool isEmpty() const Esri::ArcGISRuntime::PortalGroup * last() const Reimplemented Public Functions virtual Esri::ArcGISRuntime::PortalGroup * 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

    This model type is returned by:

    The model returns data for the following roles:

    Example:

    Access the various groups of a portalItem:

    int adminGroupsCount = 0;
    int memberGroupsCount = 0;
    int otherGroupsCount = 0;
    
    auto fetchGroupsFuture = portalItem->fetchGroupsAsync().then([portalItem, &adminGroupsCount, &memberGroupsCount, &otherGroupsCount]()
    {
      // lambda function to iterate over PortalGroupListModels
      auto printGroupTitles = [](PortalGroupListModel* groupsModel, const QString& groupName)
      {
        if (!groupsModel)
        {
          return;
        }
    
        qDebug() << groupName << ":";
        for (int i = 0; i < groupsModel->rowCount(); ++i)
        {
          if (groupsModel->at(i))
          {
            qDebug() << groupsModel->at(i)->title();
          }
        }
      };
    
      printGroupTitles(portalItem->adminGroups(), "admin groups");
      printGroupTitles(portalItem->memberGroups(), "member groups");
      printGroupTitles(portalItem->otherGroups(), "other groups");
      adminGroupsCount = portalItem->adminGroups()->rowCount();
      memberGroupsCount = portalItem->memberGroups()->rowCount();
      otherGroupsCount = portalItem->otherGroups()->rowCount();
    });

    Example:

    Accessing various roles of the model from within a QML delegate:

    Image {
        source: thumbnailUrl // use the thumbnailUrl role of the model
        fillMode: Image.PreserveAspectCrop
        height: parent.height
        width: height
    }
    
    Text {
        text: title // access the title role of the group
        font.bold: true
    }

    See also Portal, PortalGroup, PortalItem, PortalQueryParametersForGroups, and PortalQueryResultSetForGroups.

    Member Type Documentation enum PortalGroupListModel::PortalGroupRoles

    This enum specifies the custom roles which can be used with PortalGroupListModel::data.

    Constant Value Description Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupAccessRole Qt::UserRole + 1 The access level for the group. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupAdminsRole Qt::UserRole + 2 The administrator users of the group. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupCreatedRole Qt::UserRole + 3 The date the group was created. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupGroupDescriptionRole Qt::UserRole + 4 The description of the group. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupGroupIdRole Qt::UserRole + 5 The group's ID. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupInvitationOnlyRole Qt::UserRole + 6 Whether the group membership is invitation-only. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupModifiedRole Qt::UserRole + 7 The date on which the group was last modified. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupOwnerRole Qt::UserRole + 8 The username of the owner of the group. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupPhoneRole Qt::UserRole + 9 The telephone number of the group. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupSnippetRole Qt::UserRole + 10 The group summary. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupSortFieldRole Qt::UserRole + 11 The field that items in the group are sorted by. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupSortOrderRole Qt::UserRole + 12 The sort order for items in this group. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupTagsRole Qt::UserRole + 13 The user-defined tags that describe the group. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupThumbnailUrlRole Qt::UserRole + 14 The URL of the thumbnail used for the group. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupTitleRole Qt::UserRole + 15 The title of the group. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupUsersRole Qt::UserRole + 16 The users of the group. Esri::ArcGISRuntime::PortalGroupListModel::PortalGroupViewOnlyRole Qt::UserRole + 17 Whether the group membership is view-only. Member Function Documentation [override virtual noexcept] PortalGroupListModel::~PortalGroupListModel()

    Destructor.

    [override virtual] Esri::ArcGISRuntime::PortalGroup *PortalGroupListModel::at(int index) const

    Returns the PortalGroup at the specified index.

    bool PortalGroupListModel::contains(Esri::ArcGISRuntime::PortalGroup *portalGroup) const

    Returns true if the list model contains the PortalGroup portalGroup.

    [override virtual] QVariant PortalGroupListModel::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 group referred to by the index.

    [signal] void PortalGroupListModel::errorOccurred(const Esri::ArcGISRuntime::Error &error)

    Signal emitted when an error occurs.

    Esri::ArcGISRuntime::PortalGroup *PortalGroupListModel::first() const

    Returns the first PortalGroup in the list model.

    int PortalGroupListModel::indexOf(Esri::ArcGISRuntime::PortalGroup *portalGroup) const

    Returns the index of the PortalGroup portalGroup.

    bool PortalGroupListModel::isEmpty() const

    Returns whether the list model is empty (contains no groups).

    [signal, since Esri::ArcGISRuntime 100.15] void PortalGroupListModel::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 PortalGroupListModel::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::PortalGroup *PortalGroupListModel::last() const

    Returns the last PortalGroup in the list model.

    [override virtual] int PortalGroupListModel::size() const

    Returns the number of PortalGroups 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