PopupMediaListModel Class

  • PopupMediaListModel
  • class Esri::ArcGISRuntime::PopupMediaListModel

    A list model storing pop-up fields. More...

    Header: #include <PopupMediaListModel.h>
    Since: Esri::ArcGISRuntime 100.14
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    This class was introduced in Esri::ArcGISRuntime 100.14.

    Public Functions

    virtual ~PopupMediaListModel() override
    void append(Esri::ArcGISRuntime::PopupMedia *popupMedia)
    void clear()
    bool contains(Esri::ArcGISRuntime::PopupMedia *popupMedia) const
    Esri::ArcGISRuntime::PopupMedia *first() const
    int indexOf(Esri::ArcGISRuntime::PopupMedia *popupMedia) const
    void insert(int index, Esri::ArcGISRuntime::PopupMedia *popupMedia)
    bool isEmpty() const
    Esri::ArcGISRuntime::PopupMedia *last() const
    void move(int from, int to)
    void removeAt(int index)
    void removeOne(Esri::ArcGISRuntime::PopupMedia *popupMedia)

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::PopupMedia *at(int index) const override
    virtual int size() const override

    Signals

    void elementAdded(int index)
    void elementRemoved(int index)
    void errorOccurred(Esri::ArcGISRuntime::Error error)

    Detailed Description

    The model returns data for the following roles:

    RoleTypeDescription
    captionQStringThe pop-up media's caption.
    titleQStringThe pop-up media's title.
    typePopupMediaTypeThe pop-up media's type.
    valuePopupMediaValue*The pop-up media's value.

    Member Function Documentation

    [signal] void PopupMediaListModel::elementAdded(int index)

    Signal emitted when a popup field is added to the list model.

    • index is the index of the added popup media.

    [signal] void PopupMediaListModel::elementRemoved(int index)

    Signal emitted when a popup field is removed from the list model.

    • index is the index of the removed popup media.

    [signal] void PopupMediaListModel::errorOccurred(Esri::ArcGISRuntime::Error error)

    Signal emitted when an error occurs.

    • error - Details about the error.

    [override virtual] PopupMediaListModel::~PopupMediaListModel()

    destructor

    void PopupMediaListModel::append(Esri::ArcGISRuntime::PopupMedia *popupMedia)

    Appends a popupMedia to the layer list model.

    [override virtual] Esri::ArcGISRuntime::PopupMedia *PopupMediaListModel::at(int index) const

    Returns the PopupMedia at the specified index.

    void PopupMediaListModel::clear()

    Removes all PopupMedia from the list model.

    List models do not take ownership of the objects they contain. Therefore, removing or clearing objects from the list model will not delete those objects. An RAII technique should be used to ensure that memory is properly deallocated.

    bool PopupMediaListModel::contains(Esri::ArcGISRuntime::PopupMedia *popupMedia) const

    Returns true if the list model contains the specified popupMedia.

    Esri::ArcGISRuntime::PopupMedia *PopupMediaListModel::first() const

    Returns the first PopupMedia in the list model.

    int PopupMediaListModel::indexOf(Esri::ArcGISRuntime::PopupMedia *popupMedia) const

    Returns the index of the popupMedia specified.

    void PopupMediaListModel::insert(int index, Esri::ArcGISRuntime::PopupMedia *popupMedia)

    Inserts a popupMedia at a specified index in the list model.

    This method will append to the list if the index is greater than the current size of the list model.

    bool PopupMediaListModel::isEmpty() const

    Returns true if the list model contains no popup medias.

    Esri::ArcGISRuntime::PopupMedia *PopupMediaListModel::last() const

    Returns the last PopupMedia in the list model.

    void PopupMediaListModel::move(int from, int to)

    Moves one PopupMedia from an index in the list model to a different index.

    void PopupMediaListModel::removeAt(int index)

    Removes a PopupMedia at the specified index.

    List models do not take ownership of the objects they contain. Therefore, removing or clearing objects from the list model will not delete those objects. An RAII technique should be used to ensure that memory is properly deallocated.

    void PopupMediaListModel::removeOne(Esri::ArcGISRuntime::PopupMedia *popupMedia)

    Removes the specified popupMedia from the list model.

    List models do not take ownership of the objects they contain. Therefore, removing or clearing objects from the list model will not delete those objects. An RAII technique should be used to ensure that memory is properly deallocated.

    [override virtual] int PopupMediaListModel::size() const

    Returns the number of PopupMedia contained in the list model.

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