PopupDefinition Class

  • PopupDefinition
  • class Esri::ArcGISRuntime::PopupDefinition

    Defines how a Popup will be displayed and behave. More...

    Header: #include <PopupDefinition.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    PopupDefinition(QObject *parent = nullptr)
    PopupDefinition(Esri::ArcGISRuntime::GeoElement *geoElement, QObject *parent = nullptr)
    PopupDefinition(Esri::ArcGISRuntime::PopupSource *popupSource, QObject *parent = nullptr)
    virtual ~PopupDefinition() override
    QString description() const
    QList<Esri::ArcGISRuntime::PopupElement *> elements() const
    QList<Esri::ArcGISRuntime::PopupExpression *> expressions() const
    QList<Esri::ArcGISRuntime::PopupField *> fields() const
    bool isDeleteAllowed() const
    bool isEditGeometryAllowed() const
    bool isEditingAllowed() const
    bool isShowAttachments() const
    bool isShowEditSummary() const
    QList<Esri::ArcGISRuntime::PopupMedia *> media() const
    Esri::ArcGISRuntime::PopupRelatedFeaturesDefinition *relatedFeaturesDefinition() const
    void setDeleteAllowed(bool deleteAllowed)
    void setDescription(const QString &description)
    void setEditGeometryAllowed(bool editGeometryAllowed)
    void setEditingAllowed(bool editingAllowed)
    void setElements(const QList<Esri::ArcGISRuntime::PopupElement *> &elements)
    void setExpressions(const QList<Esri::ArcGISRuntime::PopupExpression *> &expressions)
    void setFields(const QList<Esri::ArcGISRuntime::PopupField *> &fields)
    void setMedia(const QList<Esri::ArcGISRuntime::PopupMedia *> &media)
    void setRelatedFeaturesDefinition(Esri::ArcGISRuntime::PopupRelatedFeaturesDefinition *relatedFeaturesDefinition)
    void setShowAttachments(bool showAttachments)
    void setShowEditSummary(bool showEditSummary)
    void setTitle(const QString &title)
    QString title() const

    Detailed Description

    Popup definitions contain information such as:

    • Which attributes the Popup should display
    • Whether the attributes are editable
    • How to format numbers and dates
    • Whether the Popup should show attachments for the GeoElement
    • What media, such as charts and images, should be displayed for the GeoElement

    Member Function Documentation

    [explicit] PopupDefinition::PopupDefinition(QObject *parent = nullptr)

    Creates a new popup definition.

    • parent - The optional parent QObject.

    Use this object to define the look and feel of pop-up windows when users click or query a feature.

    [explicit] PopupDefinition::PopupDefinition(Esri::ArcGISRuntime::GeoElement *geoElement, QObject *parent = nullptr)

    Creates a new popup definition from a GeoElement.

    • geoElement - The geoelement for the popup, such as a Feature or Graphic.
    • parent - The optional parent QObject.

    This creates a new popup definition with default properties and default popup elements based on the geoelement fields. Use this object to define the look and feel of pop-up windows when users click or query a feature.

    [explicit] PopupDefinition::PopupDefinition(Esri::ArcGISRuntime::PopupSource *popupSource, QObject *parent = nullptr)

    Creates a new popup definition from a popup source.

    This creates a new popup definition with default properties and default popup elements based on the popup source fields. Use this object to define the look and feel of pop-up windows when users click or query a feature.

    [override virtual] PopupDefinition::~PopupDefinition()

    Destructor.

    QString PopupDefinition::description() const

    Returns a string that appears in the body of the pop-up window as a description.

    The description can contain a literal value, or a placeholder for value from the geo element's attribute. The placeholder needs to be of the form {field_name} where <i>field_name</i> is a key in the geo element's attributes.

    See also setDescription().

    [since Esri::ArcGISRuntime 100.14] QList<Esri::ArcGISRuntime::PopupElement *> PopupDefinition::elements() const

    Returns a QList of PopupElement objects that represent an ordered list of pop-up elements.

    The order of the QList is the order that elements are shown in the pop-up window.

    For backward compatibility with a webmap or webscene created by clients that don't support the popup elements, a few popup elements are created to match the legacy popup style when reading a popup definition without popup elements:

    Vice versa, if the user updates the popup elements, the legacy popup style is updated during the PopupDefinition serialization, in order to match as much as possible the popup elements, so that older clients can display a popup that looks similar.

    This function was introduced in Esri::ArcGISRuntime 100.14.

    See also setElements().

    [since Esri::ArcGISRuntime 100.3] QList<Esri::ArcGISRuntime::PopupExpression *> PopupDefinition::expressions() const

    Returns a QList of PopupExpression objects defining the various Arcade expressions on the popup.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    See also setExpressions().

    QList<Esri::ArcGISRuntime::PopupField *> PopupDefinition::fields() const

    Returns a QList of PopupField objects defining how each field participates in the pop-up window.

    The order of the QList is the order that fields are shown in the pop-up window.

    See also setFields().

    bool PopupDefinition::isDeleteAllowed() const

    Returns a flag indicating whether the popup should allow the associated GeoElement to be deleted.

    bool PopupDefinition::isEditGeometryAllowed() const

    Returns a flag indicating whether the popup should allow the geometry of the associated GeoElement to be edited.

    bool PopupDefinition::isEditingAllowed() const

    Returns a flag indicating whether the popup should allow the associated GeoElement to be edited.

    bool PopupDefinition::isShowAttachments() const

    Returns a flag determining whether attachments will be loaded for feature layers that have attachments.

    bool PopupDefinition::isShowEditSummary() const

    Returns a flag indicating whether the popup should display the edit summary of the associated GeoElement.

    QList<Esri::ArcGISRuntime::PopupMedia *> PopupDefinition::media() const

    Returns a list of PopupMedia objects that define images and charts displayed in the Popup.

    See also setMedia().

    [since Esri::ArcGISRuntime 100.1] Esri::ArcGISRuntime::PopupRelatedFeaturesDefinition *PopupDefinition::relatedFeaturesDefinition() const

    Returns the related features definition.

    A definition that dictates whether related features should be displayed in the popup and how they should be sorted.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also setRelatedFeaturesDefinition().

    void PopupDefinition::setDeleteAllowed(bool deleteAllowed)

    Sets the allowDelete to deleteAllowed.

    See also isDeleteAllowed.

    void PopupDefinition::setDescription(const QString &description)

    Sets the description to description.

    See also description.

    void PopupDefinition::setEditGeometryAllowed(bool editGeometryAllowed)

    Sets the allowEditGeometry to editGeometryAllowed.

    See also isEditGeometryAllowed.

    void PopupDefinition::setEditingAllowed(bool editingAllowed)

    Sets the allowEdit to editingAllowed.

    See also isEditingAllowed.

    [since Esri::ArcGISRuntime 100.14] void PopupDefinition::setElements(const QList<Esri::ArcGISRuntime::PopupElement *> &elements)

    Sets the elements to elements.

    This function was introduced in Esri::ArcGISRuntime 100.14.

    See also elements.

    [since Esri::ArcGISRuntime 100.3] void PopupDefinition::setExpressions(const QList<Esri::ArcGISRuntime::PopupExpression *> &expressions)

    Sets the expressions to expressions.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    See also expressions.

    void PopupDefinition::setFields(const QList<Esri::ArcGISRuntime::PopupField *> &fields)

    Sets the fields to fields.

    See also fields.

    void PopupDefinition::setMedia(const QList<Esri::ArcGISRuntime::PopupMedia *> &media)

    Sets the media to media.

    See also media.

    [since Esri::ArcGISRuntime 100.1] void PopupDefinition::setRelatedFeaturesDefinition(Esri::ArcGISRuntime::PopupRelatedFeaturesDefinition *relatedFeaturesDefinition)

    Sets the relatedFeaturesDefinition to relatedFeaturesDefinition.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also relatedFeaturesDefinition.

    void PopupDefinition::setShowAttachments(bool showAttachments)

    Sets the showAttachments to showAttachments.

    See also isShowAttachments.

    void PopupDefinition::setShowEditSummary(bool showEditSummary)

    Sets the showEditSummary to showEditSummary.

    See also isShowEditSummary.

    void PopupDefinition::setTitle(const QString &title)

    Sets the title to title.

    See also title.

    QString PopupDefinition::title() const

    Returns a string that appears at the top of the pop-up window as a title.

    The title can contain a literal value, or a placeholder for value from the geo element's attribute. The placeholder needs to be of the form {field_name} where <i>field_name</i> is a key in the geo element's attributes.

    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.