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

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    PopupDefinition(Esri::ArcGISRuntime::PopupSource *popupSource, QObject *parent = nullptr)
    PopupDefinition(Esri::ArcGISRuntime::GeoElement *geoElement, QObject *parent = nullptr)
    PopupDefinition(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

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

    Creates a new popup definition from a popupSource and an optional parent.

    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.

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

    Creates a new popup definition from a GeoElement.

    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.

    PopupDefinition::PopupDefinition(QObject *parent = nullptr)

    Default constructor that takes an optional parent.

    [override virtual] PopupDefinition::~PopupDefinition()

    Destructor.

    QString PopupDefinition::description() const

    Returns the string that appears in the body of the Popup as a description.

    See also setDescription().

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

    QList<Esri::ArcGISRuntime::PopupExpression *> PopupDefinition::expressions() const

    Returns a list 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 list of PopupField objects defining how each field participates in the Popup.

    See also setFields().

    bool PopupDefinition::isDeleteAllowed() const

    Returns whether the PopupSource allows the GeoElement to be deleted.

    bool PopupDefinition::isEditGeometryAllowed() const

    Returns whether the PopupSource allows the GeoElement's geometry to be edited.

    bool PopupDefinition::isEditingAllowed() const

    Returns whether the PopupSource allows the GeoElement's attributes to be edited.

    bool PopupDefinition::isShowAttachments() const

    Returns whether the Popup should show attachments of the GeoElement.

    bool PopupDefinition::isShowEditSummary() const

    Returns whether the Popup should show the edit summary of the 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().

    Esri::ArcGISRuntime::PopupRelatedFeaturesDefinition *PopupDefinition::relatedFeaturesDefinition() const

    Returns the PopupRelatedFeaturesDefinition.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also setRelatedFeaturesDefinition().

    void PopupDefinition::setDeleteAllowed(bool deleteAllowed)

    Sets whether the PopupSource allows the GeoElement to be deleted.

    Set deleteAllowed to true to allow the GeoElement to be deleted.

    See also isDeleteAllowed().

    void PopupDefinition::setDescription(const QString &description)

    Sets the string that appears in the body of the Popup as a description.

    See also description().

    void PopupDefinition::setEditGeometryAllowed(bool editGeometryAllowed)

    Sets whether the PopupSource allows the GeoElement's geometry to be edited.

    Set editGeometryAllowed to true to allow the GeoElement's geometry to be edited.

    See also isEditGeometryAllowed().

    void PopupDefinition::setEditingAllowed(bool editingAllowed)

    Sets whether the PopupSource allows the GeoElement's attributes to be edited.

    Set editingAllowed to true to allow the GeoElement's attributes to be edited.

    See also isEditingAllowed().

    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.

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

    Sets the list of PopupExpression objects defining the various Arcade expressions on the popup.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    See also expressions().

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

    Sets a list of fields defining how each PopupField participates in the Popup.

    See also fields().

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

    Sets a list of media that define images and charts displayed in the Popup.

    See also media().

    void PopupDefinition::setRelatedFeaturesDefinition(Esri::ArcGISRuntime::PopupRelatedFeaturesDefinition *relatedFeaturesDefinition)

    Sets the PopupRelatedFeaturesDefinition to relatedFeaturesDefinition.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also relatedFeaturesDefinition().

    void PopupDefinition::setShowAttachments(bool showAttachments)

    Sets whether the Popup should showAttachments of the GeoElement.

    See also isShowAttachments().

    void PopupDefinition::setShowEditSummary(bool showEditSummary)

    Sets whether the Popup should showEditSummary of the GeoElement.

    See also isShowEditSummary().

    void PopupDefinition::setTitle(const QString &title)

    Sets a string that appears at the top of the Popup as a title.

    See also title().

    QString PopupDefinition::title() const

    Returns a string that appears at the top of the Popup as a title.

    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.