Skip to content
  • BuildingFilterBlockListModel
  • class Esri::ArcGISRuntime::BuildingFilterBlockListModel

    A list model that stores a list of building filter blocks. More...

    Header: #include <BuildingFilterBlockListModel.h>
    Since: Esri::ArcGISRuntime 300.0
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    Public Types

    enum BuildingFilterBlockRoles { BuildingFilterBlockModeRole, BuildingFilterBlockTitleRole, BuildingFilterBlockWhereClauseRole }

    Public Functions

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

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::BuildingFilterBlock *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(Esri::ArcGISRuntime::Error error)
    void itemAdded(int index)
    void itemRemoved(int index)

    Detailed Description

    Modifying this model (adding, removing, or moving) will update the filter blocks in a BuildingFilter.

    The model returns data for the following roles:

    RoleTypeDescriptionBuildingFilterBlockRoles
    modeBuildingFilterModeThe building filter block's mode.BuildingFilterBlockModeRole
    titleQStringThe building filter block's title.BuildingFilterBlockTitleRole
    whereClauseQStringThe building filter block's whereClause.BuildingFilterBlockWhereClauseRole

    Member Type Documentation

    enum BuildingFilterBlockListModel::BuildingFilterBlockRoles

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

    ConstantValueDescription
    Esri::ArcGISRuntime::BuildingFilterBlockListModel::BuildingFilterBlockModeRoleQt::UserRole + 1The building filter block's mode.
    Esri::ArcGISRuntime::BuildingFilterBlockListModel::BuildingFilterBlockTitleRoleQt::UserRole + 2The building filter block's title.
    Esri::ArcGISRuntime::BuildingFilterBlockListModel::BuildingFilterBlockWhereClauseRoleQt::UserRole + 3The building filter block's whereClause.

    Member Function Documentation

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

    Destructor.

    void BuildingFilterBlockListModel::append(Esri::ArcGISRuntime::BuildingFilterBlock *buildingFilterBlock)

    Appends a buildingFilterBlock to the list model.

    [override virtual] Esri::ArcGISRuntime::BuildingFilterBlock *BuildingFilterBlockListModel::at(int index) const

    Returns the building filter block at the specified index.

    void BuildingFilterBlockListModel::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 BuildingFilterBlockListModel::contains(Esri::ArcGISRuntime::BuildingFilterBlock *buildingFilterBlock) const

    Returns whether this list model contains the specified buildingFilterBlock.

    [override virtual] QVariant BuildingFilterBlockListModel::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 building filter block 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 BuildingFilterBlockListModel::errorOccurred(Esri::ArcGISRuntime::Error error)

    Signal emitted when an error occurs.

    • error - Details about the error.

    Esri::ArcGISRuntime::BuildingFilterBlock *BuildingFilterBlockListModel::first() const

    Returns the first building filter block in the list model.

    int BuildingFilterBlockListModel::indexOf(Esri::ArcGISRuntime::BuildingFilterBlock *buildingFilterBlock) const

    Returns the index of the specified buildingFilterBlock.

    void BuildingFilterBlockListModel::insert(int index, Esri::ArcGISRuntime::BuildingFilterBlock *buildingFilterBlock)

    Inserts a buildingFilterBlock 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 BuildingFilterBlockListModel::isEmpty() const

    Returns true if the list model contains no building filter blocks.

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

    Signal emitted when an item is added to the list model.

    • index - The index of the added item.

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

    Signal emitted when an item is removed from the list model.

    • index - The index of the removed item.

    Esri::ArcGISRuntime::BuildingFilterBlock *BuildingFilterBlockListModel::last() const

    Returns the last building filter block in the list model.

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

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

    void BuildingFilterBlockListModel::removeAt(int index)

    Removes a building filter block 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 BuildingFilterBlockListModel::removeOne(Esri::ArcGISRuntime::BuildingFilterBlock *buildingFilterBlock)

    Removes a specific building filter block (buildingFilterBlock) 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 BuildingFilterBlockListModel::size() const

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