DisplayFilterListModel Class

  • DisplayFilterListModel
  • class Esri::ArcGISRuntime::DisplayFilterListModel

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

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

    This class was introduced in Esri::ArcGISRuntime 100.13.

    Public Types

    enum DisplayFilterRoles { DisplayFilterNameRole, DisplayFilterWhereClauseRole, DisplayFilterIdRole }

    Public Functions

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

    Reimplemented Public Functions

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

    RoleTypeDescriptionDisplayFilterRoles
    nameQStringThe name of the display filter.DisplayFilterNameRole
    whereClauseQStringSQL expression that defines which features are rendered.DisplayFilterWhereClauseRole
    filterIdQStringThe identifier for the display filter (read only).DisplayFilterIdRole

    See also DisplayFilter.

    Member Type Documentation

    enum DisplayFilterListModel::DisplayFilterRoles

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

    ConstantValueDescription
    Esri::ArcGISRuntime::DisplayFilterListModel::DisplayFilterNameRoleQt::UserRole + 1The name of the display filter.
    Esri::ArcGISRuntime::DisplayFilterListModel::DisplayFilterWhereClauseRoleQt::UserRole + 2SQL expression that defines which features are rendered.
    Esri::ArcGISRuntime::DisplayFilterListModel::DisplayFilterIdRoleQt::UserRole + 3The identifier for the display filter (read only).

    Member Function Documentation

    [override virtual] DisplayFilterListModel::~DisplayFilterListModel()

    Destructor.

    void DisplayFilterListModel::append(Esri::ArcGISRuntime::DisplayFilter *displayFilter)

    Appends the displayFilter to the display filter list model.

    [override virtual] Esri::ArcGISRuntime::DisplayFilter *DisplayFilterListModel::at(int index) const

    Returns the display filter at the specified index.

    void DisplayFilterListModel::clear()

    Removes all 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 DisplayFilterListModel::contains(Esri::ArcGISRuntime::DisplayFilter *displayFilter) const

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

    [override virtual] QVariant DisplayFilterListModel::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 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::DisplayFilter *DisplayFilterListModel::first() const

    Returns the first display filter in the list model.

    int DisplayFilterListModel::indexOf(Esri::ArcGISRuntime::DisplayFilter *displayFilter) const

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

    void DisplayFilterListModel::insert(int index, Esri::ArcGISRuntime::DisplayFilter *displayFilter)

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

    bool DisplayFilterListModel::isEmpty() const

    Returns true if this list model is empty.

    Esri::ArcGISRuntime::DisplayFilter *DisplayFilterListModel::last() const

    Returns the last display filter in the list model.

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

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

    void DisplayFilterListModel::removeAt(int index)

    Removes a 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 DisplayFilterListModel::removeOne(Esri::ArcGISRuntime::DisplayFilter *displayFilter)

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

    Returns the number of 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.