ImageOverlayListModel Class

  • ImageOverlayListModel
  • class Esri::ArcGISRuntime::ImageOverlayListModel

    A container class storing a list of image overlays available in a SceneView. More...

    Header: #include <ImageOverlayListModel.h>
    Since: Esri::ArcGISRuntime 100.8
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    This class was introduced in Esri::ArcGISRuntime 100.8.

    Public Types

    enum ImageOverlayRoles { ImageOverlayOpacityRole, ImageOverlayVisibleRole }

    Public Functions

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

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::ImageOverlay *at(int index) const override
    virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
    virtual int size() const override

    Signals

    void itemAdded(int index)
    void itemRemoved(int index)

    Detailed Description

    Modifying this collection (adding, removing, moving) will update the image overlays available in an ImageOverlayListModel. Moving an overlay's position in the list model affects the draw order. The highest index is at the top and the overlay at index 0 is at the bottom.

    The model returns data for the following roles:

    RoleTypeDescriptionImageOverlayRoles
    imageOverlayOpacityfloatThe opacity of the image overlay.ImageOverlayOpacityRole
    imageOverlayVisibleboolWhether the image overlay is visible.ImageOverlayVisibleRole

    See also ImageOverlay and ImageFrame.

    Member Type Documentation

    enum ImageOverlayListModel::ImageOverlayRoles

    This enum specifies the custom roles which can be used with ImageOverlayListModel::data.

    ConstantValueDescription
    Esri::ArcGISRuntime::ImageOverlayListModel::ImageOverlayOpacityRoleQt::UserRole + 1The opacity of the image overlay.
    Esri::ArcGISRuntime::ImageOverlayListModel::ImageOverlayVisibleRoleQt::UserRole + 2Whether the image overlay is visible.

    Member Function Documentation

    [signal] void ImageOverlayListModel::itemAdded(int index)

    Signal emitted when an item is added to the list.

    index is the index of the added item.

    This function was introduced in Esri::ArcGISRuntime 100.15.

    [signal] void ImageOverlayListModel::itemRemoved(int index)

    Signal emitted when an item is removed from the list.

    index is the index of the removed item.

    This function was introduced in Esri::ArcGISRuntime 100.15.

    [override virtual] ImageOverlayListModel::~ImageOverlayListModel()

    Destructor.

    void ImageOverlayListModel::append(Esri::ArcGISRuntime::ImageOverlay *imageOverlay)

    Appends the imageOverlay to the image overlay list model.

    [override virtual] Esri::ArcGISRuntime::ImageOverlay *ImageOverlayListModel::at(int index) const

    Returns the image overlay at the specified index.

    void ImageOverlayListModel::clear()

    Removes all image overlays 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 ImageOverlayListModel::contains(Esri::ArcGISRuntime::ImageOverlay *imageOverlay) const

    Returns true if the provided imageOverlay is in the list model.

    [override virtual] QVariant ImageOverlayListModel::data(const QModelIndex &index, int role = Qt::DisplayRole) const

    Reimplements: QAbstractItemModel::data(const QModelIndex &index, int role) const.

    Returns the data stored under the given role for the image overlay referred to by the index.

    • index. The index in the model for which to return data.
    • role. The role for which to return data.

    Esri::ArcGISRuntime::ImageOverlay *ImageOverlayListModel::first() const

    Returns the first image overlay in the list model.

    int ImageOverlayListModel::indexOf(Esri::ArcGISRuntime::ImageOverlay *imageOverlay) const

    Returns the index of the provided imageOverlay in the list model.

    void ImageOverlayListModel::insert(int index, Esri::ArcGISRuntime::ImageOverlay *imageOverlay)

    Inserts an imageOverlay at a specified index in the list model.

    bool ImageOverlayListModel::isEmpty() const

    Returns true if this list model is empty.

    Esri::ArcGISRuntime::ImageOverlay *ImageOverlayListModel::last() const

    Returns the last image overlay in the list model.

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

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

    Moving an imageOverlay's position in the list model affects drawing order.

    void ImageOverlayListModel::removeAt(int index)

    Removes an imageOverlay at the specified index in 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.

    void ImageOverlayListModel::removeOne(Esri::ArcGISRuntime::ImageOverlay *imageOverlay)

    Removes the specified imageOverlay 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 ImageOverlayListModel::size() const

    Returns the number of image overlays in the model.

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