PopupAttachmentListModel QML Type

A list model storing a list of PopupAttachment available for an ArcGISFeature. More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.1

Properties

Signals

Methods

  • error forEach(callback)
  • PopupAttachment get(int index)

Detailed Description

Obtain a PopupAttachmentListModel from a PopupAttachmentManager.

The model will automatically fetch and load attachments from the underlying features so that they can be displayed in a view.

Note: You cannot declare or create a component of this type in QML code.

The model returns data for the following roles:

RoleTypeDescription
namestringThe name of the attachment.
contentTypestringThe MIME type of the attachment file.
sizeintThe size of the attachment in bytes.
localboolWhether the data for the attachments has been downloaded locally.
attachmentUrlurlThe URL of the attachment.
popupTypeEnums.PopupAttachmentTypeThe type of popup attachment.
editStateEnums.PopupAttachmentEditStateThe popup attachment edit state.
thumbnailUrlurlThe URL to the thumbnail.
fullImageUrlurlThe URL to the full image.

Property Documentation

applyFilter : bool

Whether the model should display the PopupAttachmentManager::attachments or PopupAttachmentManager::filterAttachments. This can be changed at any time.

Note: Setting this to true will return the filtered attachments. The default value is false.

See also PopupAttachmentManager::filterAttachments and PopupAttachmentManager::attachments.


autoFetchFullImages : bool

Whether full images should be requested by the model.

If this is false the model will not request full images if it encounters an empty image from the underlying popup attachment.

The popup attachment will be loaded when full images are requested if it is not loaded.

Note: The default value is true.

See also Loadable.


autoFetchThumbnails : bool

Whether thumbnails should be requested by the model automatically.

If this is false the model will not request thumbnail images if it encounters an empty thumbnail from the underlying popup attachment.

The popup attachment will be loaded when thumbnails are requested if it is not loaded.

Note: The default value is true.

See also thumbnailAspectRatioMode, thumbnailWidth, thumbnailHeight, and Loadable.


autoLoad : bool

Whether each attachment should be loaded by the model as they are accessed.

Note: The default value is true.

See also Loadable.


count : int

Returns the number of objects in the model (read-only).


thumbnailAspectRatioMode : Enums.AspectRatioMode

The aspect ratio mode that will be used to generate all thumbnails.

Note: The default value is Enums.AspectRatioModeKeepAspectRatio

See also Enums.AspectRatioMode.


thumbnailHeight : int

The height that will be used to generate all thumbnails.

Note: The default value is 64.


thumbnailWidth : int

The width that will be used to generate all thumbnails.

Note: The default value is 64.


Signal Documentation

applyFilterChanged()

Emitted when the applyFilter property changes.

Note: The corresponding handler is onApplyFilterChanged.


autoFetchFullImagesChanged()

Emitted when the autoFetchFullImages property changes.

Note: The corresponding handler is onAutoFetchFullImagesChanged.


autoFetchThumbnailsChanged()

Emitted when the autoFetchThumbnails property changes.

Note: The corresponding handler is onAutoFetchThumbnailsChanged.


autoLoadChanged()

Emitted when the autoLoad property changes.

Note: The corresponding handler is onAutoLoadChanged.


countChanged()

Emitted when the count property changes.

Note: The corresponding handler is onCountChanged.


thumbnailAspectRatioModeChanged()

Emitted when the thumbnailAspectRatioMode property changes.

Note: The corresponding handler is onThumbnailAspectRatioModeChanged.


thumbnailHeightChanged()

Emitted when the thumbnailHeight property changes.

Note: The corresponding handler is onThumbnailHeightChanged.


thumbnailWidthChanged()

Emitted when the thumbnailWidth property changes.

Note: The corresponding handler is onThumbnailWidthChanged.


Method Documentation

error forEach(callback)

Receives a callback function to execute for each attachment in the model.

The callback function can take 0 to 3 optional arguments, in order:

Returns undefined if no error occurred, and an error message otherwise.

const error = PopupAttachmentListModel.forEach(function(element, index, array) {
    ...
});
if (error) {
    console.error(error.message);
}

PopupAttachment get(int index)

Gets the PopupAttachment at a given index in the model.


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