• PointCloudColorStopListModel
  • class Esri::ArcGISRuntime::PointCloudColorStopListModel

    A list model that stores a list of point cloud color stops. More...

    Header: #include <PointCloudColorStopListModel.h>
    Since: Esri::ArcGISRuntime 300.1
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    Public Types

    enum PointCloudColorStopRoles { PointCloudColorStopColorRole, PointCloudColorStopLabelRole, PointCloudColorStopValueRole }

    Public Functions

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

    Reimplemented Public Functions

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

    Signals

    void errorOccurred(const Esri::ArcGISRuntime::Error &error)
    void itemAdded(int index)
    void itemRemoved(int index)

    Detailed Description

    Modifying this model (adding, removing, or moving) will update the stops in a PointCloudStretchRenderer.

    The model returns data for the following roles:

    RoleTypeDescriptionPointCloudColorStopRoles
    colorQColorThe point cloud color stop's color.PointCloudColorStopColorRole
    labelQStringThe point cloud color stop's label.PointCloudColorStopLabelRole
    valuedoubleThe point cloud color stop's value.PointCloudColorStopValueRole

    Member Type Documentation

    enum PointCloudColorStopListModel::PointCloudColorStopRoles

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

    ConstantValueDescription
    Esri::ArcGISRuntime::PointCloudColorStopListModel::PointCloudColorStopColorRoleQt::UserRole + 1The point cloud color stop's color.
    Esri::ArcGISRuntime::PointCloudColorStopListModel::PointCloudColorStopLabelRoleQt::UserRole + 2The point cloud color stop's label.
    Esri::ArcGISRuntime::PointCloudColorStopListModel::PointCloudColorStopValueRoleQt::UserRole + 3The point cloud color stop's value.

    Member Function Documentation

    [override virtual noexcept] PointCloudColorStopListModel::~PointCloudColorStopListModel()

    Destructor.

    void PointCloudColorStopListModel::append(Esri::ArcGISRuntime::PointCloudColorStop *pointCloudColorStop)

    Appends a pointCloudColorStop to the list model.

    [override virtual] Esri::ArcGISRuntime::PointCloudColorStop *PointCloudColorStopListModel::at(int index) const

    Returns the point cloud color stop at the specified index.

    void PointCloudColorStopListModel::clear()

    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 PointCloudColorStopListModel::contains(Esri::ArcGISRuntime::PointCloudColorStop *pointCloudColorStop) const

    Returns whether this list model contains the specified pointCloudColorStop.

    [override virtual] QVariant PointCloudColorStopListModel::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 point cloud color stop referred to by the index.

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

    [signal] void PointCloudColorStopListModel::errorOccurred(const Esri::ArcGISRuntime::Error &error)

    Signal emitted when an error occurs.

    • error - Details about the error.

    Esri::ArcGISRuntime::PointCloudColorStop *PointCloudColorStopListModel::first() const

    Returns the first point cloud color stop in the list model.

    int PointCloudColorStopListModel::indexOf(Esri::ArcGISRuntime::PointCloudColorStop *pointCloudColorStop) const

    Returns the index of the specified pointCloudColorStop.

    void PointCloudColorStopListModel::insert(int index, Esri::ArcGISRuntime::PointCloudColorStop *pointCloudColorStop)

    Inserts a pointCloudColorStop at the 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 PointCloudColorStopListModel::isEmpty() const

    Returns true if the list model contains no point cloud color stops.

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

    Signal emitted when a point cloud color stop is added to the list model.

    • index - The index of the added point cloud color stop.

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

    Signal emitted when a point cloud color stop is removed from the list model.

    • index - The index of the removed point cloud color stop.

    Esri::ArcGISRuntime::PointCloudColorStop *PointCloudColorStopListModel::last() const

    Returns the last point cloud color stop in the list model.

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

    Moves one point cloud color stop from an index in the list model to a different index.

    void PointCloudColorStopListModel::removeAt(int index)

    Removes a point cloud color stop 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 PointCloudColorStopListModel::removeOne(Esri::ArcGISRuntime::PointCloudColorStop *pointCloudColorStop)

    Removes a specific point cloud color stop (pointCloudColorStop) 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 PointCloudColorStopListModel::size() const

    Returns the number of point cloud color stops in the list model.