FeatureTableListModel Class

  • FeatureTableListModel
  • class Esri::ArcGISRuntime::FeatureTableListModel

    A list model that stores a list of feature tables. More...

    Header: #include <FeatureTableListModel>
    Since: Esri::ArcGISRuntime 100.1
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    This class was introduced in Esri::ArcGISRuntime 100.1.

    Public Types

    enum FeatureTableRoles { NameRole, GeometryTypeRole, HasGeometryRole, EditableRole, NumberOfFeaturesRole, …, LoadStatusRole }

    Public Functions

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

    Reimplemented Public Functions

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


    void errorOccurred(Esri::ArcGISRuntime::Error error)
    void featureTableAdded(int index)
    void featureTableRemoved(int index)

    Detailed Description

    Modifying this model (adding, removing, or moving) will update the feature tables available in the Map.

    The model returns data for the following roles:

    namestringThe table's name.NameRole
    geometryTypeGeometryTypeThe tables's geometry type.GeometryTypeRole
    hasGeometryboolWhether the table contains features with geometry.HasGeometryRole
    editableboolWhether the table is editable.EditableRole
    numberOfFeaturesqint64The number of features within the table.NumberOfFeaturesRole
    loadErrorintThe table's load error code.LoadErrorRole
    loadStatusLoadStatusThe table's load status.LoadStatusRole

    Member Type Documentation

    enum FeatureTableListModel::FeatureTableRoles

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

    Esri::ArcGISRuntime::FeatureTableListModel::NameRoleQt::UserRole + 1The table's name.
    Esri::ArcGISRuntime::FeatureTableListModel::GeometryTypeRoleQt::UserRole + 2The tables's geometry type.
    Esri::ArcGISRuntime::FeatureTableListModel::HasGeometryRoleQt::UserRole + 3Whether the table contains features with geometry.
    Esri::ArcGISRuntime::FeatureTableListModel::EditableRoleQt::UserRole + 4Whether the table is editable.
    Esri::ArcGISRuntime::FeatureTableListModel::NumberOfFeaturesRoleQt::UserRole + 5The number of features within the table.
    Esri::ArcGISRuntime::FeatureTableListModel::LoadErrorRoleQt::UserRole + 6The table's load error code.
    Esri::ArcGISRuntime::FeatureTableListModel::LoadStatusRoleQt::UserRole + 7The table's load status.

    Member Function Documentation

    [signal] void FeatureTableListModel::errorOccurred(Esri::ArcGISRuntime::Error error)

    Signal emitted when an error occurs.

    • error - Details about the error.

    [signal] void FeatureTableListModel::featureTableAdded(int index)

    Signal emitted when a feature table is added to the list model.

    • index - The index of the added feature table.

    [signal] void FeatureTableListModel::featureTableRemoved(int index)

    Signal emitted when a feature table is removed from the list model.

    • index - The index of the removed feature table.

    [override virtual] FeatureTableListModel::~FeatureTableListModel()


    void FeatureTableListModel::append(Esri::ArcGISRuntime::FeatureTable *featureTable)

    Appends a feature table (featureTable) to the feature table list model.

    [override virtual] Esri::ArcGISRuntime::FeatureTable *FeatureTableListModel::at(int index) const

    Returns the feature table at the specified index.

    void FeatureTableListModel::clear()

    Removes all feature tables from the list model.

    bool FeatureTableListModel::contains(Esri::ArcGISRuntime::FeatureTable *featureTable) const

    Returns true if the list model contains the specific feature table featureTable.

    [override virtual] QVariant FeatureTableListModel::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 feature table 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::FeatureTable *FeatureTableListModel::first() const

    Returns the first feature table in the list model.

    int FeatureTableListModel::indexOf(Esri::ArcGISRuntime::FeatureTable *featureTable) const

    Returns the index of the specific feature table featureTable.

    void FeatureTableListModel::insert(int index, Esri::ArcGISRuntime::FeatureTable *featureTable)

    Inserts a feature table (featureTable) at a 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 FeatureTableListModel::isEmpty() const

    Returns true if the list model contains no feature tables.

    Esri::ArcGISRuntime::FeatureTable *FeatureTableListModel::last() const

    Returns the last feature table in the list model.

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

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

    void FeatureTableListModel::removeAt(int index)

    Removes a feature table at the specified index.

    void FeatureTableListModel::removeOne(Esri::ArcGISRuntime::FeatureTable *featureTable)

    Removes a specific feature table (featureTable) from the list model.

    [override virtual] int FeatureTableListModel::size() const

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