A list model storing a list of type KmlGeometry. More...
Header | #include <Kml |
Since | Esri |
Inherits | Q |
Public Types
enum | Kml |
Public Functions
virtual | ~ |
void | append(const Esri |
void | clear() |
bool | contains(const Esri |
Esri | first() const |
int | index |
void | insert(int index, const Esri |
bool | is |
Esri | last() const |
void | move(int from, int to) |
void | remove |
void | remove |
Reimplemented Public Functions
virtual Esri | at(int index) const override |
virtual Q | data(const Q |
virtual int | size() const override |
Signals
void | error |
(since Esri void | item |
(since Esri void | item |
Detailed Description
The model returns data for the following roles:
Role | Type | Description | KmlGeometryRoles |
---|---|---|---|
geometry | Geometry | The Kml | Kml |
tessellated | bool | The Kml | Kml |
extruded | bool | The Kml | Kml |
altitude | Kml | The Kml | Kml |
kml | Kml | The Kml | Kml |
geometry | Q | JSO | Kml |
object | Kml | The Kml | Kml |
Member Type Documentation
enum KmlGeometryListModel::KmlGeometryRoles
This enum specifies the custom roles that can be used with KmlGeometryListModel::data.
Constant | Value | Description |
---|---|---|
Esri | Qt | The Kml |
Esri | 258 | Flag indicating if the Kml |
Esri | 259 | Flag indicating if the Kml |
Esri | 260 | Enum indicating altitude mode of the Kml |
Esri | 261 | Enum indicating geometry type of the Kml |
Esri | 262 | Enum indicating geometry json of the Kml |
Esri | 263 | Enum indicating the Kml |
Member Function Documentation
[override virtual noexcept]
KmlGeometryListModel::~KmlGeometryListModel ()
Destructor.
void KmlGeometryListModel::append(const Esri::ArcGISRuntime::KmlGeometry &geometry)
Appends the KmlGeometry geometry to the list model.
[override virtual]
Esri::ArcGISRuntime::KmlGeometry KmlGeometryListModel::at(int index) const
Returns the KmlGeometry at the specified index.
void KmlGeometryListModel::clear()
Removes all KmlGeometry elements 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 KmlGeometryListModel::contains(const Esri::ArcGISRuntime::KmlGeometry &geometry) const
Returns true
if the list model contains the KmlGeometry geometry.
[override virtual]
QVariant KmlGeometryListModel::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 KmlGeometry 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.
[signal]
void KmlGeometryListModel::errorOccurred (const Esri::ArcGISRuntime::Error &error)
Signal emitted when an error occurs.
- error - Details about the error.
Esri::ArcGISRuntime::KmlGeometry KmlGeometryListModel::first() const
Returns the first KmlGeometry in the list model.
int KmlGeometryListModel::indexOf (const Esri::ArcGISRuntime::KmlGeometry &geometry) const
Returns the index of the KmlGeometry geometry in the list model.
Returns -1
if geometry is not in the list model.
void KmlGeometryListModel::insert(int index, const Esri::ArcGISRuntime::KmlGeometry &geometry)
Inserts the KmlGeometry geometry into the list model at a specified index.
This method will append to the list if the index is greater than the current size of the list model.
bool KmlGeometryListModel::isEmpty () const
Returns true
if the list model contains no KmlGeometry elements.
[signal, since Esri::ArcGISRuntime 100.15]
void KmlGeometryListModel::itemAdded (int index)
Signal emitted when an item is added to the list model.
- index - The index of the added item.
This function was introduced in Esri::ArcGISRuntime 100.15.
[signal, since Esri::ArcGISRuntime 100.15]
void KmlGeometryListModel::itemRemoved (int index)
Signal emitted when an item is removed from the list model.
- index - The index of the removed item.
This function was introduced in Esri::ArcGISRuntime 100.15.
Esri::ArcGISRuntime::KmlGeometry KmlGeometryListModel::last() const
Returns the last KmlGeometry in the list model.
void KmlGeometryListModel::move(int from, int to)
Moves one KmlGeometry from an index in the list model to a different index.
Both indexes from and to must be at least 0 and less than size.
void KmlGeometryListModel::removeAt (int index)
Removes a KmlGeometry at the specified index.
No KmlGeometry will be removed if the specified index is out of range.
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 KmlGeometryListModel::removeOne (const Esri::ArcGISRuntime::KmlGeometry &geometry)
Removes the KmlGeometry geometry 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 KmlGeometryListModel::size() const
Returns the number of KmlGeometry elements contained in the list model.