SimpleRenderer Class

  • SimpleRenderer
  • class Esri::ArcGISRuntime::SimpleRenderer

    A simple renderer uses a single Symbol to draw all features and graphics. More...

    Header: #include <SimpleRenderer.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::Renderer

    Public Functions

    SimpleRenderer(QObject *parent = nullptr)
    SimpleRenderer(Esri::ArcGISRuntime::Symbol *symbol, QObject *parent = nullptr)
    virtual ~SimpleRenderer() override
    QString description() const
    QString label() const
    void setDescription(const QString &description)
    void setLabel(const QString &label)
    void setSymbol(Esri::ArcGISRuntime::Symbol *symbol)
    Esri::ArcGISRuntime::Symbol *symbol() const

    Detailed Description

    The same symbol is used for all graphics in a graphics overlay and all features in a feature layer, regardless of their attribute values.

    Example:

    Apply a SimpleRenderer to a GraphicsOverlay:

    SimpleMarkerSymbol* simpleMarker = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle, QColor(Qt::blue), 16.0, this);
    SimpleRenderer* simpleRenderer = new SimpleRenderer(simpleMarker, this);
    GraphicsOverlay* graphicsOverlay = new GraphicsOverlay(this);
    graphicsOverlay->setRenderer(simpleRenderer);

    Member Function Documentation

    [explicit] SimpleRenderer::SimpleRenderer(QObject *parent = nullptr)

    Creates a new simple renderer without a Symbol.

    • parent - The optional parent QObject.

    [explicit] SimpleRenderer::SimpleRenderer(Esri::ArcGISRuntime::Symbol *symbol, QObject *parent = nullptr)

    Creates a new simple renderer with the given symbol.

    • symbol - The symbol.
    • parent - The optional parent QObject.

    [override virtual] SimpleRenderer::~SimpleRenderer()

    Destructor.

    QString SimpleRenderer::description() const

    Returns the description for the renderer.

    See also setDescription().

    QString SimpleRenderer::label() const

    Returns the label for the renderer.

    See also setLabel().

    void SimpleRenderer::setDescription(const QString &description)

    Sets the description for the renderer.

    See also description().

    void SimpleRenderer::setLabel(const QString &label)

    Sets the label for the renderer.

    See also label().

    void SimpleRenderer::setSymbol(Esri::ArcGISRuntime::Symbol *symbol)

    Sets the symbol for the renderer.

    This symbol will be applied to all graphics or features that are in the layer that this renderer is applied to.

    See also symbol().

    Esri::ArcGISRuntime::Symbol *SimpleRenderer::symbol() const

    Returns the symbol for the renderer.

    See also setSymbol.

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