AggregateFieldListModel Class

  • AggregateFieldListModel
  • class Esri::ArcGISRuntime::AggregateFieldListModel

    A list model that stores a list of aggregate fields. More...

    Header: #include <AggregateFieldListModel.h>
    Since: Esri::ArcGISRuntime 200.3
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    Public Types

    enum AggregateFieldRoles { AggregateFieldNameRole, AggregateFieldAliasRole, AggregateFieldStatisticFieldNameRole }

    Public Functions

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

    Reimplemented Public Functions

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

    Detailed Description

    Modifying this model (adding, removing, or moving) will update the aggregate fields in an AggregationFeatureReduction.

    The model returns data for the following roles:

    RoleTypeDescriptionSublayerRoles
    nameQStringThe AggregateField name.AggregateFieldNameRole
    aliasQStringThe AggregateField alias.AggregateFieldAliasRole
    statisticFieldNameQStringThe AggregateField statisticFieldName.AggregateFieldStatisticFieldNameRole

    Member Type Documentation

    enum AggregateFieldListModel::AggregateFieldRoles

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

    ConstantValueDescription
    Esri::ArcGISRuntime::AggregateFieldListModel::AggregateFieldNameRoleQt::UserRole + 1The aggregate field's name.
    Esri::ArcGISRuntime::AggregateFieldListModel::AggregateFieldAliasRole258The aggregate field's alias.
    Esri::ArcGISRuntime::AggregateFieldListModel::AggregateFieldStatisticFieldNameRole259The aggregate field's statistic field name.

    Member Function Documentation

    [override virtual] AggregateFieldListModel::~AggregateFieldListModel()

    Destructor.

    void AggregateFieldListModel::append(Esri::ArcGISRuntime::AggregateField *aggregateField)

    Appends a aggregateField to the list model.

    [override virtual] Esri::ArcGISRuntime::AggregateField *AggregateFieldListModel::at(int index) const

    Returns the aggregate field at the specified index.

    void AggregateFieldListModel::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 AggregateFieldListModel::contains(Esri::ArcGISRuntime::AggregateField *aggregateField) const

    Returns whether this list model contains the specified aggregateField.

    [override virtual] QVariant AggregateFieldListModel::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 aggregate field 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 AggregateFieldListModel::errorOccurred(const Esri::ArcGISRuntime::Error &error)

    Signal emitted when an error occurs.

    • error - Details about the error.

    Esri::ArcGISRuntime::AggregateField *AggregateFieldListModel::first() const

    Returns the first aggregate field in the list model.

    int AggregateFieldListModel::indexOf(Esri::ArcGISRuntime::AggregateField *aggregateField) const

    Returns the index of the specified aggregateField.

    void AggregateFieldListModel::insert(int index, Esri::ArcGISRuntime::AggregateField *aggregateField)

    Inserts a aggregateField 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 AggregateFieldListModel::isEmpty() const

    Returns true if the list model contains no aggregate fields.

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

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

    • index - The index of the added item.

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

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

    • index - The index of the removed item.

    Esri::ArcGISRuntime::AggregateField *AggregateFieldListModel::last() const

    Returns the last aggregate field in the list model.

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

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

    void AggregateFieldListModel::removeAt(int index)

    Removes a aggregate field 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 AggregateFieldListModel::removeOne(Esri::ArcGISRuntime::AggregateField *aggregateField)

    Removes a specific aggregate field (aggregateField) 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 AggregateFieldListModel::size() const

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