CodedValueDescriptionListModel Class

  • CodedValueDescriptionListModel
  • class Esri::ArcGISRuntime::CodedValueDescriptionListModel

    A list model storing code value descriptions. More...

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

    Public Functions

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

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::CodedValueDescription *at(int index) 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

    The model returns data for the following roles:

    RoleTypeDescription
    nameQStringThe code value description's name.
    valueQVariantThe code value description's value.

    Member Function Documentation

    [override virtual] CodedValueDescriptionListModel::~CodedValueDescriptionListModel()

    destructor

    void CodedValueDescriptionListModel::append(Esri::ArcGISRuntime::CodedValueDescription *codedValueDescription)

    Appends a codedValueDescription to the layer list model.

    [override virtual] Esri::ArcGISRuntime::CodedValueDescription *CodedValueDescriptionListModel::at(int index) const

    Returns the CodedValueDescription at the specified index.

    void CodedValueDescriptionListModel::clear()

    Removes all CodedValueDescription 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 CodedValueDescriptionListModel::contains(Esri::ArcGISRuntime::CodedValueDescription *codedValueDescription) const

    Returns true if the list model contains the specified codedValueDescription.

    [signal] void CodedValueDescriptionListModel::errorOccurred(const Esri::ArcGISRuntime::Error &error)

    Signal emitted when an error occurs.

    • error - Details about the error.

    Esri::ArcGISRuntime::CodedValueDescription *CodedValueDescriptionListModel::first() const

    Returns the first CodedValueDescription in the list model.

    int CodedValueDescriptionListModel::indexOf(Esri::ArcGISRuntime::CodedValueDescription *codedValueDescription) const

    Returns the index of the codedValueDescription specified.

    void CodedValueDescriptionListModel::insert(int index, Esri::ArcGISRuntime::CodedValueDescription *codedValueDescription)

    Inserts a codedValueDescription 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 CodedValueDescriptionListModel::isEmpty() const

    Returns true if the list model contains no popup fields.

    [signal, since Esri::ArcGISRuntime 100.15] void CodedValueDescriptionListModel::itemAdded(int index)

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

    • index is the index of the added item.

    This function was introduced in Esri::ArcGISRuntime 100.15.

    [signal, since Esri::ArcGISRuntime 100.15] void CodedValueDescriptionListModel::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.

    Esri::ArcGISRuntime::CodedValueDescription *CodedValueDescriptionListModel::last() const

    Returns the last CodedValueDescription in the list model.

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

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

    void CodedValueDescriptionListModel::removeAt(int index)

    Removes a CodedValueDescription 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 CodedValueDescriptionListModel::removeOne(Esri::ArcGISRuntime::CodedValueDescription *codedValueDescription)

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

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