Skip to content
  • AttachmentsPopupElement
  • class Esri::ArcGISRuntime::AttachmentsPopupElement

    A popup element that displays the attachments of a GeoElement in a popup. More...

    Header: #include <AttachmentsPopupElement>
    Since: Esri::ArcGISRuntime 100.14
    Inherits: Esri::ArcGISRuntime::PopupElement

    Public Functions

    AttachmentsPopupElement(Esri::ArcGISRuntime::PopupAttachmentsDisplayType displayType, QObject *parent = nullptr)
    virtual ~AttachmentsPopupElement() override
    (since Esri::ArcGISRuntime 200.3) QList<Esri::ArcGISRuntime::PopupAttachment *> attachments() const
    QString description() const
    Esri::ArcGISRuntime::PopupAttachmentsDisplayType displayType() const
    (since Esri::ArcGISRuntime 200.3) QFuture<void> fetchAttachmentsAsync()
    (since Esri::ArcGISRuntime 300.0) QStringList keywords() const
    (since Esri::ArcGISRuntime 300.0) QList<Esri::ArcGISRuntime::AttachmentsPopupElementMediaType> mediaTypes() const
    void setDescription(const QString &description)
    void setDisplayType(Esri::ArcGISRuntime::PopupAttachmentsDisplayType displayType)
    (since Esri::ArcGISRuntime 300.0) void setKeywords(const QStringList &keywords)
    (since Esri::ArcGISRuntime 300.0) void setMediaTypes(const QList<Esri::ArcGISRuntime::AttachmentsPopupElementMediaType> &mediaTypes)
    void setTitle(const QString &title)
    QString title() const

    Detailed Description

    Attachments can be shown as a `preview` that fits into the width of the popup or as a link. The format of attachments in the popup 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 popup 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 popup. 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.

    [since Esri::ArcGISRuntime 300.0] QStringList AttachmentsPopupElement::keywords() const

    Returns the collection of keywords associated with the element.

    Attachments are included when an attachment's Attachment::keywords value has a case-insensitive match with one of the keywords in this collection.

    This function was introduced in Esri::ArcGISRuntime 300.0.

    See also setKeywords().

    [since Esri::ArcGISRuntime 300.0] QList<Esri::ArcGISRuntime::AttachmentsPopupElementMediaType> AttachmentsPopupElement::mediaTypes() const

    Returns a collection of attachment popup element media types allowed in the element.

    This function was introduced in Esri::ArcGISRuntime 300.0.

    See also setMediaTypes().

    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.

    [since Esri::ArcGISRuntime 300.0] void AttachmentsPopupElement::setKeywords(const QStringList &keywords)

    Sets the keywords to keywords.

    This function was introduced in Esri::ArcGISRuntime 300.0.

    See also keywords.

    [since Esri::ArcGISRuntime 300.0] void AttachmentsPopupElement::setMediaTypes(const QList<Esri::ArcGISRuntime::AttachmentsPopupElementMediaType> &mediaTypes)

    Sets the mediaTypes to mediaTypes.

    This function was introduced in Esri::ArcGISRuntime 300.0.

    See also mediaTypes.

    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().

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