DistanceSymbolRangeListModel Class

  • DistanceSymbolRangeListModel
  • class Esri::ArcGISRuntime::DistanceSymbolRangeListModel

    A list model of DistanceSymbolRange objects. More...

    Header: #include <DistanceSymbolRangeListModel.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    Public Types

    enum DistanceSymbolRangeRoles { DistanceSymbolRangeMaxDistanceRole, DistanceSymbolRangeMinDistanceRole, DistanceSymbolRangeSymbolRole }

    Public Functions

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

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::DistanceSymbolRange *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

    DistanceSymbolRangeListModel is used closely with DistanceCompositeSceneSymbol and DistanceSymbolRange to manage dynamic symbols based on distance from the Camera.

    In the context of its use as a member object of DistanceCompositeSceneSymbol, modifying this model (adding, removing, or reordering items) will update the distance symbol ranges available in the distance composite scene symbol.

    The model returns data for the following roles:

    RoleTypeDescriptionDistanceSymbolRangeRoles
    maxDistancedoubleThe maximum distance range value.DistanceSymbolRangeMaxDistanceRole
    minDistancedoubleThe minimum distance range value.DistanceSymbolRangeMinDistanceRole
    symbolSymbolThe symbol for the distance symbol range.DistanceSymbolRangeSymbolRole

    Member Type Documentation

    enum DistanceSymbolRangeListModel::DistanceSymbolRangeRoles

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

    ConstantValueDescription
    Esri::ArcGISRuntime::DistanceSymbolRangeListModel::DistanceSymbolRangeMaxDistanceRoleQt::UserRole + 1The maximum distance range value.
    Esri::ArcGISRuntime::DistanceSymbolRangeListModel::DistanceSymbolRangeMinDistanceRoleQt::UserRole + 2The minimum distance range value.
    Esri::ArcGISRuntime::DistanceSymbolRangeListModel::DistanceSymbolRangeSymbolRoleQt::UserRole + 3The symbol for the distance symbol range.

    Member Function Documentation

    [override virtual] DistanceSymbolRangeListModel::~DistanceSymbolRangeListModel()

    destructor

    void DistanceSymbolRangeListModel::append(Esri::ArcGISRuntime::DistanceSymbolRange *distanceSymbolRange)

    Appends a distanceSymbolRange object to the DistanceSymbolRangeListModel

    [override virtual] Esri::ArcGISRuntime::DistanceSymbolRange *DistanceSymbolRangeListModel::at(int index) const

    Returns the distanceSymbolRange at the specified index.

    void DistanceSymbolRangeListModel::clear()

    Removes all distance symbol ranges 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 DistanceSymbolRangeListModel::contains(Esri::ArcGISRuntime::DistanceSymbolRange *distanceSymbolRange) const

    Returns true if the list model contains the specified distanceSymbolRange.

    [override virtual] QVariant DistanceSymbolRangeListModel::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 symbol range 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 DistanceSymbolRangeListModel::errorOccurred(const Esri::ArcGISRuntime::Error &error)

    Signal emitted when an error occurs.

    • error - Details about the error.

    Esri::ArcGISRuntime::DistanceSymbolRange *DistanceSymbolRangeListModel::first() const

    Returns the first distanceSymbolRange in the list model.

    int DistanceSymbolRangeListModel::indexOf(Esri::ArcGISRuntime::DistanceSymbolRange *distanceSymbolRange) const

    Returns the index of the distanceSymbolRange specified.

    void DistanceSymbolRangeListModel::insert(int index, Esri::ArcGISRuntime::DistanceSymbolRange *distanceSymbolRange)

    Inserts a distanceSymbolRange at a specified index in the list model.

    This method will append to the list model if the index is greater than the current size of the list.

    bool DistanceSymbolRangeListModel::isEmpty() const

    Returns whether this DistanceSymbolRangeListModel is empty.

    [signal, since Esri::ArcGISRuntime 100.15] void DistanceSymbolRangeListModel::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 DistanceSymbolRangeListModel::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::DistanceSymbolRange *DistanceSymbolRangeListModel::last() const

    Returns the last distanceSymbolRange in the list model.

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

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

    void DistanceSymbolRangeListModel::removeAt(int index)

    Removes a distanceSymbolRange 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 DistanceSymbolRangeListModel::removeOne(Esri::ArcGISRuntime::DistanceSymbolRange *distanceSymbolRange)

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

    Returns the number or rows in the list model.

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