GraphicsOverlayListModel Class

  • GraphicsOverlayListModel
  • class Esri::ArcGISRuntime::GraphicsOverlayListModel

    A container class storing a list of graphics overlays available in a GeoView. More...

    Header: #include <GraphicsOverlayListModel>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Types

    enum GraphicsOverlayRoles { GraphicsOverlayMinScaleRole, GraphicsOverlayMaxScaleRole, GraphicsOverlayOpacityRole, GraphicsOverlayVisibleRole, GraphicsOverlaySelectionColorRole, GraphicsOverlayIdRole }

    Public Functions

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

    Reimplemented Public Functions

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


    void graphicsOverlayAdded(int index)
    void graphicsOverlayRemoved(int index)

    Detailed Description

    Modifying this collection (adding, removing, moving) will update the graphics overlays available in the GeoView.

    The model returns data for the following roles:

    minScaledoubleThe minimum scale at which the graphics should be displayed.GraphicsOverlayMinScaleRole
    maxScaledoubleThe maximum scale at which the graphics should be displayed.GraphicsOverlayMaxScaleRole
    graphicsOverlayOpacityfloatThe opacity of the graphics.GraphicsOverlayOpacityRole
    graphicsOverlayVisibleboolWhether the graphics overlay is visible.GraphicsOverlayVisibleRole
    selectionColorQColorThe selection color applied to selected graphics.GraphicsOverlaySelectionColorRole
    idQStringThe ID of the selected graphics.GraphicsOverlayIdRole

    See also GraphicsOverlay.

    Member Type Documentation

    enum GraphicsOverlayListModel::GraphicsOverlayRoles

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

    Esri::ArcGISRuntime::GraphicsOverlayListModel::GraphicsOverlayMinScaleRoleQt::UserRole + 1The minimum scale at which the graphics should be displayed.
    Esri::ArcGISRuntime::GraphicsOverlayListModel::GraphicsOverlayMaxScaleRoleQt::UserRole + 2The maximum scale at which the graphics should be displayed.
    Esri::ArcGISRuntime::GraphicsOverlayListModel::GraphicsOverlayOpacityRoleQt::UserRole + 3The opacity of the graphics.
    Esri::ArcGISRuntime::GraphicsOverlayListModel::GraphicsOverlayVisibleRoleQt::UserRole + 4Whether the graphics overlay is visible.
    Esri::ArcGISRuntime::GraphicsOverlayListModel::GraphicsOverlaySelectionColorRoleQt::UserRole + 5The selection color applied to selected graphics.
    Esri::ArcGISRuntime::GraphicsOverlayListModel::GraphicsOverlayIdRoleQt::UserRole + 6The ID of the selected graphics.

    Member Function Documentation

    [signal] void GraphicsOverlayListModel::graphicsOverlayAdded(int index)

    Signal emitted when a GraphicsOverlay is added to the list.

    index is the index of the added GraphicsOverlay.

    [signal] void GraphicsOverlayListModel::graphicsOverlayRemoved(int index)

    Signal emitted when a GraphicsOverlay is removed from the list.

    index is the index of the removed GraphicsOverlay.

    [override virtual] GraphicsOverlayListModel::~GraphicsOverlayListModel()


    void GraphicsOverlayListModel::append(Esri::ArcGISRuntime::GraphicsOverlay *graphicsOverlay)

    Appends the graphicsOverlay to the graphics overlay list model.

    [override virtual] Esri::ArcGISRuntime::GraphicsOverlay *GraphicsOverlayListModel::at(int index) const

    Returns the graphics overlay at the specified index.

    void GraphicsOverlayListModel::clear()

    Removes all graphics overlays from the list model.

    bool GraphicsOverlayListModel::contains(Esri::ArcGISRuntime::GraphicsOverlay *graphicsOverlay) const

    Returns true if the provided graphicsOverlay is in the list model.

    [override virtual] QVariant GraphicsOverlayListModel::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 graphics overlay 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::GraphicsOverlay *GraphicsOverlayListModel::first() const

    Returns the first graphics overlay in the list model.

    int GraphicsOverlayListModel::indexOf(Esri::ArcGISRuntime::GraphicsOverlay *graphicsOverlay) const

    Returns the index of the provided graphicsOverlay in the list model.

    void GraphicsOverlayListModel::insert(int index, Esri::ArcGISRuntime::GraphicsOverlay *graphicsOverlay)

    Inserts a graphicsOverlay at a specified index in the list model.

    bool GraphicsOverlayListModel::isEmpty() const

    Returns true if this list model is empty.

    Esri::ArcGISRuntime::GraphicsOverlay *GraphicsOverlayListModel::last() const

    Returns the last graphics overlay in the list model.

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

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

    void GraphicsOverlayListModel::removeAt(int index)

    Removes a graphics overlay at the specified index in the list model.

    void GraphicsOverlayListModel::removeOne(Esri::ArcGISRuntime::GraphicsOverlay *graphicsOverlay)

    Removes the specified graphicsOverlay from the list model.

    [override virtual] int GraphicsOverlayListModel::size() const

    Returns the number of graphics overlays in the model.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.