SubtypeSubtableListModel Class

  • SubtypeSubtableListModel
  • class Esri::ArcGISRuntime::SubtypeSubtableListModel

    A list model that stores a list of SubtypeSubtable. More...

    Header: #include <SubtypeSubtableListModel.h>
    Since: Esri::ArcGISRuntime 200.7
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    Public Types

    enum SubtypeSubtableRoles { SubtypeSubtableNameRole, SubtypeSubtableAllowsEditingRole }

    Public Functions

    virtual ~SubtypeSubtableListModel() override
    void append(Esri::ArcGISRuntime::SubtypeSubtable *subtypeSubtable)
    void clear()
    bool contains(Esri::ArcGISRuntime::SubtypeSubtable *subtypeSubtable) const
    Esri::ArcGISRuntime::SubtypeSubtable *first() const
    int indexOf(Esri::ArcGISRuntime::SubtypeSubtable *subtypeSubtable) const
    bool isEmpty() const
    Esri::ArcGISRuntime::SubtypeSubtable *last() const
    void move(int from, int to)
    void removeAt(int index)
    void removeOne(Esri::ArcGISRuntime::SubtypeSubtable *subtypeSubtable)

    Reimplemented Public Functions

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

    Detailed Description

    Modifying this model (adding, removing, or moving) will update the subtype tables in an ArcGISFeatureTable.

    The model returns data for the following roles:

    RoleTypeDescriptionSubtypeSubtableRoles
    nameQStringThe SubtypeSubtable name.SubtypeSubtableNameRole
    allowsEditingboolThe SubtypeSubtable allowsEditing property.SubtypeSubtableAllowsEditingRole

    Member Type Documentation

    enum SubtypeSubtableListModel::SubtypeSubtableRoles

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

    ConstantValueDescription
    Esri::ArcGISRuntime::SubtypeSubtableListModel::SubtypeSubtableNameRoleQt::UserRole + 1SubtypeSubtable::name
    Esri::ArcGISRuntime::SubtypeSubtableListModel::SubtypeSubtableAllowsEditingRole258SubtypeSubtable::allowsEditing

    Member Function Documentation

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

    destructor

    void SubtypeSubtableListModel::append(Esri::ArcGISRuntime::SubtypeSubtable *subtypeSubtable)

    Appends a subtype table (subtypeSubtable) to the list model.

    [override virtual] Esri::ArcGISRuntime::SubtypeSubtable *SubtypeSubtableListModel::at(int index) const

    Returns the subtype table at the specified index.

    void SubtypeSubtableListModel::clear()

    Removes all subtype tables 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 SubtypeSubtableListModel::contains(Esri::ArcGISRuntime::SubtypeSubtable *subtypeSubtable) const

    Returns whether the list model contains the specified subtypeSubtable.

    [override virtual] QVariant SubtypeSubtableListModel::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 subtype 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::SubtypeSubtable *SubtypeSubtableListModel::first() const

    Returns the first subtype table in the list model.

    int SubtypeSubtableListModel::indexOf(Esri::ArcGISRuntime::SubtypeSubtable *subtypeSubtable) const

    Returns the index of the specified subtypeSubtable.

    bool SubtypeSubtableListModel::isEmpty() const

    Returns true if the list model contains no subtype tables.

    Esri::ArcGISRuntime::SubtypeSubtable *SubtypeSubtableListModel::last() const

    Returns the last subtype table in the list model

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

    Moves a subtype table from one index (from) to another index (to).

    void SubtypeSubtableListModel::removeAt(int index)

    Removes a subtype table 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 SubtypeSubtableListModel::removeOne(Esri::ArcGISRuntime::SubtypeSubtable *subtypeSubtable)

    Removes a specific subtype table (subtypeSubtable) 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 SubtypeSubtableListModel::size() const

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