AnalysisOverlayListModel Class
A list model storing a list of analysis overlays available in a scene view. More...
Header: | #include <AnalysisOverlayListModel> |
Since: | Esri::ArcGISRuntime 100.2 |
Inherits: | QAbstractListModel and Esri::ArcGISRuntime::Iterable |
This class was introduced in Esri::ArcGISRuntime 100.2.
Public Types
enum | AnalysisOverlayRoles { AnalysisOverlayVisibleRole } |
Public Functions
virtual | ~AnalysisOverlayListModel() override |
void | append(Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay) |
void | clear() |
bool | contains(Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay) const |
Esri::ArcGISRuntime::AnalysisOverlay * | first() const |
int | indexOf(Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay) const |
void | insert(int index, Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay) |
bool | isEmpty() const |
Esri::ArcGISRuntime::AnalysisOverlay * | last() const |
void | move(int from, int to) |
void | removeAt(int index) |
void | removeOne(Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay) |
Reimplemented Public Functions
virtual Esri::ArcGISRuntime::AnalysisOverlay * | at(int index) const override |
virtual QVariant | data(const QModelIndex &index, int role = Qt::DisplayRole) const override |
virtual int | size() const override |
Signals
void | analysisOverlayAdded(int index) |
void | analysisOverlayRemoved(int index) |
void | errorOccurred(Esri::ArcGISRuntime::Error error) |
Detailed Description
Modifying this model (adding, removing, moving) will update the analysis overlays available in the scene view.
The model returns data for the following roles:
Role | Type | Description | AnalysisOverlayRoles |
---|---|---|---|
analysisOverlayVisible | bool | The analysis overlay's visibility. | AnalysisOverlayVisibleRole |
Member Type Documentation
enum AnalysisOverlayListModel::AnalysisOverlayRoles
This enum specifies the custom roles which can be used with AnalysisOverlayListModel::data.
Constant | Value | Description |
---|---|---|
Esri::ArcGISRuntime::AnalysisOverlayListModel::AnalysisOverlayVisibleRole | Qt::UserRole + 1 | The analysis overlay's visibility. |
Member Function Documentation
[signal]
void AnalysisOverlayListModel::analysisOverlayAdded(int index)
Signal emitted when an analysis overlay is added to the list model.
- index - The index of the added analysis overlay.
[signal]
void AnalysisOverlayListModel::analysisOverlayRemoved(int index)
Signal emitted when an analysis overlay is removed from the list model.
- index - The index of the removed analysis overlay.
[signal]
void AnalysisOverlayListModel::errorOccurred(Esri::ArcGISRuntime::Error error)
Signal emitted when an error occurs.
- error - Details about the error.
[override virtual]
AnalysisOverlayListModel::~AnalysisOverlayListModel()
Destructor.
void AnalysisOverlayListModel::append(Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay)
Appends an analysisOverlay to the analysis overlay list model.
[override virtual]
Esri::ArcGISRuntime::AnalysisOverlay *AnalysisOverlayListModel::at(int index) const
Returns the analysis
overlay at the specified index.
void AnalysisOverlayListModel::clear()
Removes all analysis overlays from the list model.
bool AnalysisOverlayListModel::contains(Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay) const
Returns true
if the list model contains the specified analysisOverlay.
[override virtual]
QVariant AnalysisOverlayListModel::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 analysis 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.
An empty value is returned if the specified index is out of range.
Esri::ArcGISRuntime::AnalysisOverlay *AnalysisOverlayListModel::first() const
Returns the first analysis overlay in the list model.
int AnalysisOverlayListModel::indexOf(Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay) const
Returns the index of the analysisOverlay specified.
void AnalysisOverlayListModel::insert(int index, Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay)
Inserts an analysisOverlay 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 AnalysisOverlayListModel::isEmpty() const
Returns true
if the list model contains no analysis overlays.
Esri::ArcGISRuntime::AnalysisOverlay *AnalysisOverlayListModel::last() const
Returns the last analysis overlay in the list model.
void AnalysisOverlayListModel::move(int from, int to)
Moves one analysis overlay from an index in the list model to a different index.
void AnalysisOverlayListModel::removeAt(int index)
Removes an analysis overlay at the specified index.
No analysis overlay will be removed if the specified index is out of range.
void AnalysisOverlayListModel::removeOne(Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay)
Removes the specified analysisOverlay from the list model.
[override virtual]
int AnalysisOverlayListModel::size() const
Returns the number of analysis overlays contained in the list model.