VectorMarkerSymbolElementListModel Class

  • VectorMarkerSymbolElementListModel
  • class Esri::ArcGISRuntime::VectorMarkerSymbolElementListModel

    A list model storing a list of vector marker symbol elements. More...

    Header: #include <VectorMarkerSymbolElementListModel.h>
    Since: Esri::ArcGISRuntime 100.5
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    This class was introduced in Esri::ArcGISRuntime 100.5.

    Public Types

    enum VectorMarkerSymbolElementRoles { GeometryRole, SymbolRole, GeometryJsonRole }

    Public Functions

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

    Reimplemented Public Functions

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

    Detailed Description

    Modifying this model (adding, removing, moving) will update the VectorMarkerSymbolLayer.

    The model returns data for the following roles:

    RoleTypeDescriptionVectorMarkerSymbolElementRoles
    geometryEsri::ArcGISRuntime::GeometryThe geometry.GeometryRole
    symbolEsri::ArcGISRuntime::SymbolThe symbol.SymbolRole
    geometryJsonQStringJSON geometry representation (as a string). Can be passed instead of a Geometry object and a geometry will be serialized from JSON.GeometryJsonRole

    See also Geometry::toJson.

    Member Type Documentation

    enum VectorMarkerSymbolElementListModel::VectorMarkerSymbolElementRoles

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

    ConstantValueDescription
    Esri::ArcGISRuntime::VectorMarkerSymbolElementListModel::GeometryRoleQt::UserRole + 1The geometry of the VectorMarkerSymbolElement.
    Esri::ArcGISRuntime::VectorMarkerSymbolElementListModel::SymbolRoleQt::UserRole + 2The symbol of the VectorMarkerSymbolElement.
    Esri::ArcGISRuntime::VectorMarkerSymbolElementListModel::GeometryJsonRoleQt::UserRole + 3The geometry json of the VectorMarkerSymbolElement's geometry.

    Member Function Documentation

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

    Signal emitted when an error occurs.

    • error - Details about the error.

    [signal] void VectorMarkerSymbolElementListModel::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] void VectorMarkerSymbolElementListModel::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] VectorMarkerSymbolElementListModel::~VectorMarkerSymbolElementListModel()

    Destructor.

    void VectorMarkerSymbolElementListModel::append(Esri::ArcGISRuntime::VectorMarkerSymbolElement *vectorMarkerSymbolElement)

    Appends a vectorMarkerSymbolElement to the VectorMarkerSymbolElementListModel.

    [override virtual] Esri::ArcGISRuntime::VectorMarkerSymbolElement *VectorMarkerSymbolElementListModel::at(int index) const

    Returns the VectorMarkerSymbolElement at the specified index.

    void VectorMarkerSymbolElementListModel::clear()

    Removes all vector marker symbol elements 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 VectorMarkerSymbolElementListModel::contains(Esri::ArcGISRuntime::VectorMarkerSymbolElement *vectorMarkerSymbolElement) const

    Returns true if the list model contains the specified vectorMarkerSymbolElement.

    [override virtual] QVariant VectorMarkerSymbolElementListModel::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 symbol 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::VectorMarkerSymbolElement *VectorMarkerSymbolElementListModel::first() const

    Returns the first vector marker symbol element in the list model.

    int VectorMarkerSymbolElementListModel::indexOf(Esri::ArcGISRuntime::VectorMarkerSymbolElement *vectorMarkerSymbolElement) const

    Returns the index of the vectorMarkerSymbolElement specified.

    void VectorMarkerSymbolElementListModel::insert(int index, Esri::ArcGISRuntime::VectorMarkerSymbolElement *vectorMarkerSymbolElement)

    Inserts a vectorMarkerSymbolElement 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 VectorMarkerSymbolElementListModel::isEmpty() const

    Returns true if the list model contains no vector marker symbol elements.

    Esri::ArcGISRuntime::VectorMarkerSymbolElement *VectorMarkerSymbolElementListModel::last() const

    Returns the last vector marker symbol element in the list model.

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

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

    void VectorMarkerSymbolElementListModel::removeAt(int index)

    Removes a symbol 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 VectorMarkerSymbolElementListModel::removeOne(Esri::ArcGISRuntime::VectorMarkerSymbolElement *vectorMarkerSymbolElement)

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

    Returns the number of vector marker symbol elements 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.