A pop-up element that displays the attachments of a GeoElement in a pop-up. More...
Header | #include <Attachments |
Since | Esri |
Inherits | Esri |
Public Functions
Attachments | |
virtual | ~ |
(since Esri Q | attachments() const |
Q | description() const |
Esri | display |
(since Esri Q | fetch |
void | set |
void | set |
void | set |
Q | title() const |
Detailed Description
Attachments can be shown as a `preview` that fits into the width of the pop-up or as a link. The format of attachments in the pop-up is determined by the displayType. If the geoelement has more than one attachment, they are displayed in the same order as the attachments QList.
See also PopupElementType::AttachmentsPopupElement.
Member Function Documentation
[explicit]
AttachmentsPopupElement::AttachmentsPopupElement (Esri::ArcGISRuntime::PopupAttachmentsDisplayType displayType , QObject *parent = nullptr)
Creates a new attachments pop-up element with the given PopupAttachmentsDisplayType.
- displayType - Indicates how to display the attachments.
- parent - The optional parent QObject.
[override virtual noexcept]
AttachmentsPopupElement::~AttachmentsPopupElement ()
Destructor.
[since Esri::ArcGISRuntime 200.3]
QList <Esri::ArcGISRuntime::PopupAttachment *> AttachmentsPopupElement::attachments() const
Returns a QList of the geoelement's attachments.
If attachments haven't been fetched or the PopupElement::isEvaluated value is false
, the QList is empty.
This function was introduced in Esri::ArcGISRuntime 200.3.
See also fetchAttachmentsAsync.
QString AttachmentsPopupElement::description() const
Returns a string value describing the popup element in detail. The value can be an empty string.
See also setDescription().
Esri::ArcGISRuntime::PopupAttachmentsDisplayType AttachmentsPopupElement::displayType () const
Returns how to display the attachments. If `list` is specified, attachments show as links.
If the value is PopupAttachmentsDisplayType::List, attachments show as links. If the value is PopupAttachmentsDisplayType::Preview, attachments expand to the width of the pop-up. A value PopupAttachmentsDisplayType::Auto allows your app to determine the most suitable default experience.
See also setDisplayType().
[since Esri::ArcGISRuntime 200.3]
QFuture <void> AttachmentsPopupElement::fetchAttachmentsAsync ()
Fetches the attachments from the Feature, creates PopupAttachment objects from them, and populates attachments.
If PopupElement::isEvaluated is false
, this method will have no effect.
Attachments are not re-fetched if they have already been fetched.
This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.
See Working with QFuture for further details.
This function was introduced in Esri::ArcGISRuntime 200.3.
void AttachmentsPopupElement::setDescription (const QString &description)
Sets the description to description.
See also description.
void AttachmentsPopupElement::setDisplayType (Esri::ArcGISRuntime::PopupAttachmentsDisplayType displayType )
Sets the displayType to displayType.
See also displayType.
void AttachmentsPopupElement::setTitle (const QString &title)
Sets the title to title.
See also title.
QString AttachmentsPopupElement::title() const
Returns a string value indicating what the element represents. The value can be an empty string.
See also setTitle().