PopupAttributeListModel Class

  • PopupAttributeListModel
  • class Esri::ArcGISRuntime::PopupAttributeListModel

    A list model used for viewing and editing attributes in a Popup. More...

    Header: #include <PopupAttributeListModel.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: QAbstractListModel

    Public Types

    enum PopupAttributeRoles { PopupAttributeFieldNameRole, PopupAttributeFieldValueRole, PopupAttributePopupDateFormatRole, PopupAttributeDecimalPlacesRole, PopupAttributeIsUseThousandsSeparatorRole, …, PopupAttributeFeatureTypeRole }

    Properties

    Public Functions

    virtual ~PopupAttributeListModel() override
    QList<Esri::ArcGISRuntime::PopupField *> popupFields() const

    Reimplemented Public Functions

    virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override

    Signals

    void errorOccurred(const Esri::ArcGISRuntime::Error &error)

    Detailed Description

    Obtain a PopupAttributeListModel from the PopupManager.

    The model returns data for the following roles:

    RoleTypeDescriptionSublayerRoles
    fieldNameQStringThe field name for the PopupField.PopupAttributeFieldNameRole
    fieldValueQVariantThe value for the PopupField.PopupAttributeFieldValueRole
    popupDateFormatPopupDateFormatThe PopupDateFormat for the PopupField.PopupAttributePopupDateFormatRole
    decimalPlacesintThe number of decimal places to display for numerical fields.PopupAttributeDecimalPlacesRole
    isUseThousandsSeparatorboolIf the thousands separator should be used.PopupAttributeIsUseThousandsSeparatorRole
    isEditableboolWhether the PopupField is editable.PopupAttributeIsEditableRole
    isVisibleboolWhether the PopupField is visible.PopupAttributeIsVisibleRole
    isNullableboolWhether the PopupField is nullable.PopupAttributeIsNullableRole
    labelQStringThe PopupField label.PopupAttributeLabelRole
    popupStringFieldOptionPopupStringFieldOptionThe PopupStringFieldOption for the PopupField.PopupAttributePopupStringFieldOptionRole
    tooltipQStringThe tooltip for the PopupField.PopupAttributeTooltipRole
    formattedValueQStringThe formatted value for the PopupField.PopupAttributeFormattedValueRole
    fieldTypeFieldTypeThe FieldType for the PopupField.PopupAttributeFieldTypeRole
    maxLengthintThe maxmimum length for the PopupField.PopupAttributeMaxLengthRole
    isFeatureTypeboolWhether the PopupField is a feature type.PopupAttributeIsFeatureTypeRole
    validationErrorTextQStringThe validation error text if there is any.PopupAttributeValidationErrorTextRole
    rangeDomainValidationTextQStringThe range domain validation text if applicable.PopupAttributeRangeDomainValidationTextRole
    useThousandsSeparatorQStringIf the thousands separator should be used (since 100.1).PopupAttributeUseThousandsSeparatorRole
    editableboolWhether the PopupField is editable (since 100.1).PopupAttributeEditableRole
    attributeVisibleboolWhether the PopupField is visible (since 100.1).PopupAttributeAttributeVisibleRole
    nullableboolWhether the PopupField is nullable (since 100.1).PopupAttributeNullableRole
    featureTypeboolWhether the PopupField is a feature type (since 100.1).PopupAttributeFeatureTypeRole

    Member Type Documentation

    enum PopupAttributeListModel::PopupAttributeRoles

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

    ConstantValueDescription
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeFieldNameRoleQt::UserRole + 1The field name for the PopupField.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeFieldValueRoleQt::UserRole + 2The value for the PopupField.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributePopupDateFormatRoleQt::UserRole + 3The PopupDateFormat for the PopupField.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeDecimalPlacesRoleQt::UserRole + 4The number of decimal places to display for numerical fields.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeIsUseThousandsSeparatorRoleQt::UserRole + 5If the thousands separator should be used.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeIsEditableRoleQt::UserRole + 6Whether the PopupField is editable.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeIsVisibleRoleQt::UserRole + 7Whether the PopupField is visible.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeIsNullableRoleQt::UserRole + 8Whether the PopupField is nullable.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeLabelRoleQt::UserRole + 9The PopupField label.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributePopupStringFieldOptionRoleQt::UserRole + 10The PopupStringFieldOption for the PopupField.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeTooltipRoleQt::UserRole + 11The tooltip for the PopupField.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeFormattedValueRoleQt::UserRole + 12The formatted value for the PopupField.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeFieldTypeRoleQt::UserRole + 13The FieldType for the PopupField.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeMaxLengthRoleQt::UserRole + 14The maxmimum length for the PopupField.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeIsFeatureTypeRoleQt::UserRole + 15Whether the PopupField is a feature type.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeValidationErrorTextRoleQt::UserRole + 16The validation error text if there is any.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeRangeDomainValidationTextRoleQt::UserRole + 17The range domain validation text if applicable.
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeUseThousandsSeparatorRoleQt::UserRole + 18If the thousands separator should be used (since 100.1).
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeEditableRoleQt::UserRole + 19Whether the PopupField is editable (since 100.1).
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeAttributeVisibleRoleQt::UserRole + 20Whether the PopupField is visible (since 100.1).
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeNullableRoleQt::UserRole + 21Whether the PopupField is nullable (since 100.1).
    Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeFeatureTypeRoleQt::UserRole + 22Whether the PopupField is a feature type (since 100.1).

    Property Documentation

    [read-only] count : const int

    This property holds the number of attributes in this list model (read-only).

    Member Function Documentation

    [override virtual] PopupAttributeListModel::~PopupAttributeListModel()

    Destructor.

    [override virtual] QVariant PopupAttributeListModel::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 popup attribute 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 PopupAttributeListModel::errorOccurred(const Esri::ArcGISRuntime::Error &error)

    Signal emitted when an error occurs.

    • error - Details about the error.

    QList<Esri::ArcGISRuntime::PopupField *> PopupAttributeListModel::popupFields() const

    Returns a list of PopupFields.

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