FieldDescriptionListModel Class

  • FieldDescriptionListModel
  • class Esri::ArcGISRuntime::FieldDescriptionListModel

    A list model storing a list of FieldDescription objects in a TableDescription. More...

    Header: #include <FieldDescriptionListModel.h>
    Since: Esri::ArcGISRuntime 100.14
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    This class was introduced in Esri::ArcGISRuntime 100.14.

    Public Types

    enum FieldDescriptionRoles { FieldDescriptionAliasRole, FieldDescriptionDomainNameRole, FieldDescriptionEditableRole, FieldDescriptionFieldTypeRole, FieldDescriptionLengthRole, …, FieldDescriptionNullableRole }

    Public Functions

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

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::FieldDescription *at(int index) 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, moving) will update the FieldDescription's available in the TableDescription.

    The model returns data for the following roles:

    RoleTypeDescription
    aliasQStringThe field's alias.
    domainNameQStringThe name of the domain to use on this field.
    editableboolTrue if the field is editable.
    fieldTypeFieldTypeThe field's data type.
    lengthintThe length of the field.
    nameQStringThe field's name.
    nullableboolTrue if the field is nullable.

    Member Type Documentation

    enum FieldDescriptionListModel::FieldDescriptionRoles

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

    ConstantValueDescription
    Esri::ArcGISRuntime::FieldDescriptionListModel::FieldDescriptionAliasRoleQt::UserRole + 1The field's alias.
    Esri::ArcGISRuntime::FieldDescriptionListModel::FieldDescriptionDomainNameRoleQt::UserRole + 2The name of the domain to use on this field.
    Esri::ArcGISRuntime::FieldDescriptionListModel::FieldDescriptionEditableRoleQt::UserRole + 3True if the field is editable.
    Esri::ArcGISRuntime::FieldDescriptionListModel::FieldDescriptionFieldTypeRoleQt::UserRole + 4The field's data type.
    Esri::ArcGISRuntime::FieldDescriptionListModel::FieldDescriptionLengthRoleQt::UserRole + 5The length of the field.
    Esri::ArcGISRuntime::FieldDescriptionListModel::FieldDescriptionNameRoleQt::UserRole + 6The field's name.
    Esri::ArcGISRuntime::FieldDescriptionListModel::FieldDescriptionNullableRoleQt::UserRole + 7True if the field is nullable.

    Member Function Documentation

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

    Signal emitted when an error occurs.

    • error - Details about the error.

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

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

    • index is the index of the added field description.

    This function was introduced in Esri::ArcGISRuntime 100.15.

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

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

    • index is the index of the removed item.

    This function was introduced in Esri::ArcGISRuntime 100.15.

    [override virtual] FieldDescriptionListModel::~FieldDescriptionListModel()

    destructor

    void FieldDescriptionListModel::append(Esri::ArcGISRuntime::FieldDescription *fieldDescription)

    Appends a fieldDescription to the layer list model.

    [override virtual] Esri::ArcGISRuntime::FieldDescription *FieldDescriptionListModel::at(int index) const

    Returns the FieldDescription at the specified index.

    void FieldDescriptionListModel::clear()

    Removes all FieldDescription 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 FieldDescriptionListModel::contains(Esri::ArcGISRuntime::FieldDescription *fieldDescription) const

    Returns true if the list model contains the specified fieldDescription.

    Esri::ArcGISRuntime::FieldDescription *FieldDescriptionListModel::first() const

    Returns the first FieldDescription in the list model.

    int FieldDescriptionListModel::indexOf(Esri::ArcGISRuntime::FieldDescription *fieldDescription) const

    Returns the index of the fieldDescription specified.

    void FieldDescriptionListModel::insert(int index, Esri::ArcGISRuntime::FieldDescription *fieldDescription)

    Inserts a fieldDescription 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 FieldDescriptionListModel::isEmpty() const

    Returns true if the list model contains no field description.

    Esri::ArcGISRuntime::FieldDescription *FieldDescriptionListModel::last() const

    Returns the last FieldDescription in the list model.

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

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

    void FieldDescriptionListModel::removeAt(int index)

    Removes a FieldDescription 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 FieldDescriptionListModel::removeOne(Esri::ArcGISRuntime::FieldDescription *fieldDescription)

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

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