Skip To Content ArcGIS for Developers Sign In Dashboard

PopupAttachment Class

(Esri::ArcGISRuntime::PopupAttachment)

An attachment to a Popup, which contains the attachment data and some additional metadata about the attachment. More...

Header: #include <PopupAttachment>
Since: Esri::ArcGISRuntime 100.0
Inherits: Object and Loadable

Public Functions

~PopupAttachment()
Attachment *attachment() const
QUrl attachmentUrl() const
QString contentType() const
PopupAttachmentEditState editState() const
QUuid fullImage()
bool isLocal() const
QString name() const
PopupAttachmentType popupType() const
qint64 size() const
QUuid thumbnail(int width, int height, AspectRatioMode aspectRatioMode = AspectRatioMode::KeepAspectRatio)

Reimplemented Public Functions

virtual void cancelLoad()
virtual void load()
virtual Error loadError() const
virtual LoadStatus loadStatus() const
virtual void retryLoad()

Signals

void doneLoading(Esri::ArcGISRuntime::Error error)
void fullImageCompleted(QUuid taskId, const QImage &thumbnail)
void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)
void thumbnailCompleted(QUuid taskId, const QImage &thumbnail)

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

An attachment to a Popup, which contains the attachment data and some additional metadata about the attachment.

Obtain PopupAttachments from the PopupAttachmentManager.

Member Function Documentation

PopupAttachment::~PopupAttachment()

Destructor.

Attachment *PopupAttachment::attachment() const

Returns the underlying attachment.

QUrl PopupAttachment::attachmentUrl() const

Returns the PopupAttachment URL.

[virtual] void PopupAttachment::cancelLoad()

Reimplemented from Loadable::cancelLoad().

See Loadable.

QString PopupAttachment::contentType() const

Returns the content type of the PopupAttachment.

[signal] void PopupAttachment::doneLoading(Esri::ArcGISRuntime::Error error)

Signal emitted when this object is done loading.

  • error - Details about any error that may have occurred.

Note: If there is a load error it will also be emitted on the errorOccurred signal.

See also Loadable and Object.

PopupAttachmentEditState PopupAttachment::editState() const

Returns the edit state of the PopupAttachment.

QUuid PopupAttachment::fullImage()

Returns the full image for displaying the attachment in full screen or some UI larger than a thumbnail.

This is only supported if the PopupAttachmentType is Image.

The fullImageCompleted signal emits when this asynchronous operation completes. Use the returned QUuid to keep track of concurrent operations.

[signal] void PopupAttachment::fullImageCompleted(QUuid taskId, const QImage &thumbnail)

Signal emitted when the full image of the attachment is obtained.

  • taskId - The task ID for the asynchronous operation.
  • thumbnail - The full image of the attachment.

bool PopupAttachment::isLocal() const

Returns whether the PopupAttachment is local.

[virtual] void PopupAttachment::load()

Reimplemented from Loadable::load().

See Loadable.

[virtual] Error PopupAttachment::loadError() const

Reimplemented from Loadable::loadError().

See Loadable.

[virtual] LoadStatus PopupAttachment::loadStatus() const

Reimplemented from Loadable::loadStatus().

See Loadable.

[signal] void PopupAttachment::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

Signal emitted when the loadStatus changes for this object.

See also Loadable.

QString PopupAttachment::name() const

Returns the name of the PopupAttachment.

PopupAttachmentType PopupAttachment::popupType() const

Returns the type of the PopupAttachment.

[virtual] void PopupAttachment::retryLoad()

Reimplemented from Loadable::retryLoad().

See Loadable.

qint64 PopupAttachment::size() const

Returns the size of the PopupAttachment in bytes.

QUuid PopupAttachment::thumbnail(int width, int height, AspectRatioMode aspectRatioMode = AspectRatioMode::KeepAspectRatio)

Returns a thumbnail image with a give width, height, and aspectRatioMode.

This is only supported if the PopupAttachmentType is Image.

The thumbnailCompleted signal emits when this asynchronous operation completes. Use the returned QUuid to keep track of concurrent operations.

[signal] void PopupAttachment::thumbnailCompleted(QUuid taskId, const QImage &thumbnail)

Signal emitted when the thumbnail image of the attachment is obtained.

  • taskId - The task ID for the asynchronous operation.
  • thumbnail - The thumbnail image of the attachment.

Feedback on this topic?