Skip To Content ArcGIS for Developers Sign In Dashboard

PopupAttachmentListModel QML Type

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

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

Properties

Signals

Methods

  • void 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.


autoFetchFullImagesChanged()

Emitted when the autoFetchFullImages property changes.


autoFetchThumbnailsChanged()

Emitted when the autoFetchThumbnails property changes.


autoLoadChanged()

Emitted when the autoLoad property changes.


countChanged()

Emitted when the count property changes.


thumbnailAspectRatioModeChanged()

Emitted when the thumbnailAspectRatioMode property changes.


thumbnailHeightChanged()

Emitted when the thumbnailHeight property changes.


thumbnailWidthChanged()

Emitted when the thumbnailWidth property changes.


Method Documentation

void 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.

var 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.



Feedback on this topic?