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
- count : const int
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:
Role | Type | Description | SublayerRoles |
---|---|---|---|
fieldName | QString | The field name for the PopupField. | PopupAttributeFieldNameRole |
fieldValue | QVariant | The value for the PopupField. | PopupAttributeFieldValueRole |
popupDateFormat | PopupDateFormat | The PopupDateFormat for the PopupField. | PopupAttributePopupDateFormatRole |
decimalPlaces | int | The number of decimal places to display for numerical fields. | PopupAttributeDecimalPlacesRole |
isUseThousandsSeparator | bool | If the thousands separator should be used. | PopupAttributeIsUseThousandsSeparatorRole |
isEditable | bool | Whether the PopupField is editable. | PopupAttributeIsEditableRole |
isVisible | bool | Whether the PopupField is visible. | PopupAttributeIsVisibleRole |
isNullable | bool | Whether the PopupField is nullable. | PopupAttributeIsNullableRole |
label | QString | The PopupField label. | PopupAttributeLabelRole |
popupStringFieldOption | PopupStringFieldOption | The PopupStringFieldOption for the PopupField. | PopupAttributePopupStringFieldOptionRole |
tooltip | QString | The tooltip for the PopupField. | PopupAttributeTooltipRole |
formattedValue | QString | The formatted value for the PopupField. | PopupAttributeFormattedValueRole |
fieldType | FieldType | The FieldType for the PopupField. | PopupAttributeFieldTypeRole |
maxLength | int | The maxmimum length for the PopupField. | PopupAttributeMaxLengthRole |
isFeatureType | bool | Whether the PopupField is a feature type. | PopupAttributeIsFeatureTypeRole |
validationErrorText | QString | The validation error text if there is any. | PopupAttributeValidationErrorTextRole |
rangeDomainValidationText | QString | The range domain validation text if applicable. | PopupAttributeRangeDomainValidationTextRole |
useThousandsSeparator | QString | If the thousands separator should be used (since 100.1). | PopupAttributeUseThousandsSeparatorRole |
editable | bool | Whether the PopupField is editable (since 100.1). | PopupAttributeEditableRole |
attributeVisible | bool | Whether the PopupField is visible (since 100.1). | PopupAttributeAttributeVisibleRole |
nullable | bool | Whether the PopupField is nullable (since 100.1). | PopupAttributeNullableRole |
featureType | bool | Whether 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.
Constant | Value | Description |
---|---|---|
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeFieldNameRole | Qt::UserRole + 1 | The field name for the PopupField. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeFieldValueRole | Qt::UserRole + 2 | The value for the PopupField. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributePopupDateFormatRole | Qt::UserRole + 3 | The PopupDateFormat for the PopupField. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeDecimalPlacesRole | Qt::UserRole + 4 | The number of decimal places to display for numerical fields. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeIsUseThousandsSeparatorRole | Qt::UserRole + 5 | If the thousands separator should be used. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeIsEditableRole | Qt::UserRole + 6 | Whether the PopupField is editable. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeIsVisibleRole | Qt::UserRole + 7 | Whether the PopupField is visible. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeIsNullableRole | Qt::UserRole + 8 | Whether the PopupField is nullable. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeLabelRole | Qt::UserRole + 9 | The PopupField label. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributePopupStringFieldOptionRole | Qt::UserRole + 10 | The PopupStringFieldOption for the PopupField. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeTooltipRole | Qt::UserRole + 11 | The tooltip for the PopupField. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeFormattedValueRole | Qt::UserRole + 12 | The formatted value for the PopupField. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeFieldTypeRole | Qt::UserRole + 13 | The FieldType for the PopupField. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeMaxLengthRole | Qt::UserRole + 14 | The maxmimum length for the PopupField. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeIsFeatureTypeRole | Qt::UserRole + 15 | Whether the PopupField is a feature type. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeValidationErrorTextRole | Qt::UserRole + 16 | The validation error text if there is any. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeRangeDomainValidationTextRole | Qt::UserRole + 17 | The range domain validation text if applicable. |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeUseThousandsSeparatorRole | Qt::UserRole + 18 | If the thousands separator should be used (since 100.1). |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeEditableRole | Qt::UserRole + 19 | Whether the PopupField is editable (since 100.1). |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeAttributeVisibleRole | Qt::UserRole + 20 | Whether the PopupField is visible (since 100.1). |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeNullableRole | Qt::UserRole + 21 | Whether the PopupField is nullable (since 100.1). |
Esri::ArcGISRuntime::PopupAttributeListModel::PopupAttributeFeatureTypeRole | Qt::UserRole + 22 | Whether 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.