Skip To Content ArcGIS for Developers Sign In Dashboard

ImageOverlayListModel Class

(Esri::ArcGISRuntime::ImageOverlayListModel)

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

Header: #include <ImageOverlayListModel>
Since: Esri::ArcGISRuntime 100.8
Inherits: QAbstractListModel and Iterable<ImageOverlay *>

Public Types

enum ImageOverlayRoles { ImageOverlayOpacityRole, ImageOverlayVisibleRole }

Public Functions

~ImageOverlayListModel()
void append(ImageOverlay *imageOverlay)
ImageOverlay *at(int index) const
void clear()
bool contains(ImageOverlay *imageOverlay) const
ImageOverlay *first() const
int indexOf(ImageOverlay *imageOverlay) const
void insert(int index, ImageOverlay *imageOverlay)
bool isEmpty() const
ImageOverlay *last() const
void move(int from, int to)
void removeAt(int index)
void removeOne(ImageOverlay *imageOverlay)
int size() const

Reimplemented Public Functions

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

Signals

void imageOverlayAdded(int index)
void imageOverlayRemoved(int index)

Additional Inherited Members

Detailed Description

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

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

ImageOverlayListModel::~ImageOverlayListModel()

Destructor.

void ImageOverlayListModel::append(ImageOverlay *imageOverlay)

Appends the imageOverlay to the image overlay list model.

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.

bool ImageOverlayListModel::contains(ImageOverlay *imageOverlay) const

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

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

Reimplemented from QAbstractItemModel::data().

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.

ImageOverlay *ImageOverlayListModel::first() const

Returns the first image overlay in the list model.

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

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

int ImageOverlayListModel::indexOf(ImageOverlay *imageOverlay) const

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

void ImageOverlayListModel::insert(int index, 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.

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.

void ImageOverlayListModel::removeOne(ImageOverlay *imageOverlay)

Removes the specified imageOverlay from the list model.

int ImageOverlayListModel::size() const

Returns the number of image overlays in the model.


Feedback on this topic?