ScaleRangeDisplayFilterListModel Class

  • ScaleRangeDisplayFilterListModel
  • class Esri::ArcGISRuntime::ScaleRangeDisplayFilterListModel

    A container class storing a list of scale range display filters. More...

    Header: #include <ScaleRangeDisplayFilterListModel.h>
    Since: Esri::ArcGISRuntime 100.13
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    This class was introduced in Esri::ArcGISRuntime 100.13.

    Public Types

    enum ScaleRangeDisplayFilterRoles { ScaleRangeDisplayFilterNameRole, ScaleRangeDisplayFilterWhereClauseRole, ScaleRangeDisplayFilterIdRole, ScaleRangeDisplayFilterMinScaleRole, ScaleRangeDisplayFilterMaxScaleRole }

    Public Functions

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

    Reimplemented Public Functions

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

    Detailed Description

    The model returns data for the following roles:

    RoleTypeDescriptionScaleRangeDisplayFilterRoles
    nameQStringThe name of the scale range display filter.ScaleRangeDisplayFilterNameRole
    whereClauseQStringSQL expression that defines which features are rendered.ScaleRangeDisplayFilterWhereClauseRole
    filterIdQStringThe identifier for the scale range display filter (read only).ScaleRangeDisplayFilterIdRole
    minScaledoubleThe minimum scale at which this scale range display filter is applied.ScaleRangeDisplayFilterMinScaleRole
    maxScaledoubleThe maximum scale at which this scale range display filter is applied.ScaleRangeDisplayFilterMaxScaleRole

    See also ScaleRangeDisplayFilter.

    Member Type Documentation

    enum ScaleRangeDisplayFilterListModel::ScaleRangeDisplayFilterRoles

    This enum specifies the custom roles that can be used with ScaleRangeDisplayFilterListModel::data.

    ConstantValueDescription
    Esri::ArcGISRuntime::ScaleRangeDisplayFilterListModel::ScaleRangeDisplayFilterNameRoleQt::UserRole + 1The name of the scale range display filter.
    Esri::ArcGISRuntime::ScaleRangeDisplayFilterListModel::ScaleRangeDisplayFilterWhereClauseRoleQt::UserRole + 2SQL expression that defines which features are rendered.
    Esri::ArcGISRuntime::ScaleRangeDisplayFilterListModel::ScaleRangeDisplayFilterIdRoleQt::UserRole + 3The identifier for the scale range display filter (read only).
    Esri::ArcGISRuntime::ScaleRangeDisplayFilterListModel::ScaleRangeDisplayFilterMinScaleRoleQt::UserRole + 4The minimum scale at which this scale range display filter is applied.
    Esri::ArcGISRuntime::ScaleRangeDisplayFilterListModel::ScaleRangeDisplayFilterMaxScaleRoleQt::UserRole + 5The maximum scale at which this scale range display filter is applied.

    Member Function Documentation

    [override virtual] ScaleRangeDisplayFilterListModel::~ScaleRangeDisplayFilterListModel()

    Destructor.

    void ScaleRangeDisplayFilterListModel::append(Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter)

    Appends the scaleRangeDisplayFilter to the scale range display filter list model.

    [override virtual] Esri::ArcGISRuntime::ScaleRangeDisplayFilter *ScaleRangeDisplayFilterListModel::at(int index) const

    Returns the scale range display filter at the specified index.

    void ScaleRangeDisplayFilterListModel::clear()

    Removes all scale range display filters 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 ScaleRangeDisplayFilterListModel::contains(Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter) const

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

    [override virtual] QVariant ScaleRangeDisplayFilterListModel::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 scale range display filter referred to by the index.

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

    Esri::ArcGISRuntime::ScaleRangeDisplayFilter *ScaleRangeDisplayFilterListModel::first() const

    Returns the first scale range display filter in the list model.

    int ScaleRangeDisplayFilterListModel::indexOf(Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter) const

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

    void ScaleRangeDisplayFilterListModel::insert(int index, Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter)

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

    bool ScaleRangeDisplayFilterListModel::isEmpty() const

    Returns true if this list model is empty.

    Esri::ArcGISRuntime::ScaleRangeDisplayFilter *ScaleRangeDisplayFilterListModel::last() const

    Returns the last scale range display filter in the list model.

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

    Moves one scale range display filter from an index in the list model to a different index.

    void ScaleRangeDisplayFilterListModel::removeAt(int index)

    Removes a scale range display filter at the specified index in 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.

    void ScaleRangeDisplayFilterListModel::removeOne(Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter)

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

    Returns the number of scale range display filters in the model.

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