GeometryEditorStyle Class

GeometryEditor."> GeometryEditorStyle Class | ArcGISQtCpp
  • GeometryEditorStyle
  • class Esri::ArcGISRuntime::GeometryEditorStyle

    Defines the visual appearance of a geometry displayed by the GeometryEditor. More...

    Header: #include <GeometryEditorStyle.h>
    Since: Esri::ArcGISRuntime 200.1
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    GeometryEditorStyle(QObject *parent = nullptr)
    virtual ~GeometryEditorStyle() override
    Esri::ArcGISRuntime::Symbol *boundingBoxHandleSymbol() const
    Esri::ArcGISRuntime::Symbol *boundingBoxSymbol() const
    Esri::ArcGISRuntime::Symbol *feedbackLineSymbol() const
    Esri::ArcGISRuntime::Symbol *feedbackVertexSymbol() const
    Esri::ArcGISRuntime::Symbol *fillSymbol() const
    Esri::ArcGISRuntime::Symbol *lineSymbol() const
    Esri::ArcGISRuntime::Symbol *midVertexSymbol() const
    float opacity() const
    Esri::ArcGISRuntime::Symbol *rotateHandleSymbol() const
    Esri::ArcGISRuntime::Symbol *selectedMidVertexSymbol() const
    Esri::ArcGISRuntime::Symbol *selectedVertexSymbol() const
    void setBoundingBoxHandleSymbol(Esri::ArcGISRuntime::Symbol *boundingBoxHandleSymbol)
    void setBoundingBoxSymbol(Esri::ArcGISRuntime::Symbol *boundingBoxSymbol)
    void setFeedbackLineSymbol(Esri::ArcGISRuntime::Symbol *feedbackLineSymbol)
    void setFeedbackVertexSymbol(Esri::ArcGISRuntime::Symbol *feedbackVertexSymbol)
    void setFillSymbol(Esri::ArcGISRuntime::Symbol *fillSymbol)
    void setLineSymbol(Esri::ArcGISRuntime::Symbol *lineSymbol)
    void setMidVertexSymbol(Esri::ArcGISRuntime::Symbol *midVertexSymbol)
    void setOpacity(float opacity)
    void setRotateHandleSymbol(Esri::ArcGISRuntime::Symbol *rotateHandleSymbol)
    void setSelectedMidVertexSymbol(Esri::ArcGISRuntime::Symbol *selectedMidVertexSymbol)
    void setSelectedVertexSymbol(Esri::ArcGISRuntime::Symbol *selectedVertexSymbol)
    void setVertexSymbol(Esri::ArcGISRuntime::Symbol *vertexSymbol)
    void setVertexTextSymbol(Esri::ArcGISRuntime::Symbol *vertexTextSymbol)
    Esri::ArcGISRuntime::Symbol *vertexSymbol() const
    Esri::ArcGISRuntime::Symbol *vertexTextSymbol() const

    Detailed Description

    Each GeometryEditorTool has a GeometryEditorStyle which controls the appearance of the different elements of the GeometryEditor::geometry. You can change the symbology used for vertices, selections, lines and fills. For example, in a Feature editing workflow, you can set the lineSymbol to match the symbol of a polyline feature in order to provide visual consistency.

    When a GeometryEditorTool is created, a consistent set of default symbology appropriate for that tool type is applied to its GeometryEditorTool::style property.

    You can change the opacity of the overall style, or alternatively set different opacity (alpha) values on the individual symbols of the style, so that the underlying map components are visible through the geometry being edited.

    You can set each symbol to nullptr - consider carefully how this can affect your workflows, as you will not be able to see, select, or otherwise interact with those GeometryEditorElement types.

    See also InteractionConfiguration and Symbol.

    Member Function Documentation

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

    Creates a new GeometryEditorStyle with a consistent set of red symbols, and displays white numbers on vertices.

    • parent - The optional parent QObject.

    Using this constructor results in the same default symbology as the VertexTool::style.

    [override virtual] GeometryEditorStyle::~GeometryEditorStyle()

    Destructor.

    [since Esri::ArcGISRuntime 200.2] Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::boundingBoxHandleSymbol() const

    Returns the symbol used to draw control handles for interactive scaling when a scalable element is selected in the GeometryEditor and InteractionConfiguration::isAllowScalingSelectedElement is true.

    When the GeometryEditor::selectedElement is scalable, this symbol displays control handles to allow interactive scaling (resizing) of the element. The handles are drawn upon the bounding box (see boundingBoxSymbol). If the selected element cannot be scaled (see GeometryEditorElement::canScale) then this symbol is ignored and no handles are drawn.

    The default symbol is a white square SimpleMarkerSymbol with a black outline. Use either a MarkerSymbol or an appropriate advanced symbol if setting this property.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also setBoundingBoxHandleSymbol(), InteractionConfiguration::isAllowScalingSelectedElement, and GeometryEditor::scaleSelectedElement(double, double, Point).

    [since Esri::ArcGISRuntime 200.2] Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::boundingBoxSymbol() const

    Returns the symbol used to draw a bounding box when a movable, rotatable, or scalable element is selected in the GeometryEditor and InteractionConfiguration::isAllowScalingSelectedElement is true.

    When the GeometryEditor::selectedElement is movable, rotatable, or scalable, this symbol displays its minimum bounding box. If the selected element cannot be moved (GeometryEditorElement::canMove), rotated (GeometryEditorElement::canRotate), or scaled (GeometryEditorElement::canScale) then this symbol is ignored and no box is drawn.

    Control handles for interactively scaling the element are drawn upon the bounding box (see boundingBoxHandleSymbol).

    The default value is a dashed black SimpleLineSymbol. Use either a LineSymbol, a FillSymbol, or an appropriate advanced symbol if setting this property.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also setBoundingBoxSymbol(), InteractionConfiguration::isAllowScalingSelectedElement, and GeometryEditor::scaleSelectedElement(double, double, Point).

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::feedbackLineSymbol() const

    Returns the symbol used to draw the edges currently being changed by an interactive edit, when editing polyline or polygon geometries.

    During an interactive edit, this symbol displays the current location of edges (polylines, or boundaries of polygons) that are changed by the interaction in progress. Unchanged lines remain displayed with lineSymbol.

    The default value is a dotted red SimpleLineSymbol.

    See also setFeedbackLineSymbol() and feedbackVertexSymbol.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::feedbackVertexSymbol() const

    Returns the symbol used to draw vertices currently being changed by an interactive edit, when editing any geometry type.

    During an interactive edit, this symbol displays the current location of vertices that are changed by the interaction in progress. Unchanged vertices remain displayed with vertexSymbol.

    Vertex numbers are not displayed for the changed vertices. The default value is the same as the default vertexSymbol.

    See also setFeedbackVertexSymbol(), feedbackVertexSymbol, and vertexTextSymbol.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::fillSymbol() const

    Returns the symbol used to fill the current geometry when editing polygon geometries.

    The default value is a red semi-transparent SimpleFillSymbol with a red outline.

    See also setFillSymbol() and lineSymbol.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::lineSymbol() const

    Returns the symbol used to draw the current geometry when editing polyline geometries, and the outline of the geometry when editing polygon geometries.

    The default value is a solid red SimpleLineSymbol.

    See also setLineSymbol(), feedbackLineSymbol, and fillSymbol.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::midVertexSymbol() const

    Returns the symbol used to draw the mid-vertices of the current geometry when editing polygon or polyline geometries.

    Mid-vertices do not exist in the GeometryEditor::geometry, but instead exist only in the display, located between vertices in polygon and polyline geometries as a visual cue for interactive editing. When moved interactively, a new vertex is inserted at that location.

    If nullptr, no mid-vertex is displayed. In this case, you can still insert vertices between existing vertices by selecting an existing GeometryEditorVertex and tapping on the map.

    See also setMidVertexSymbol(), GeometryEditorMidVertex, vertexSymbol, selectedMidVertexSymbol, and InteractionConfiguration::setAllowMidVertexSelection.

    float GeometryEditorStyle::opacity() const

    Returns the opacity of the GeometryEditor display in the view, a value between 0 (fully transparent) and 1 (fully opaque). Default is 1.

    It can be useful to change opacity of the entire GeometryEditor display to allow features, graphics, or imagery in the underlying map view to show through the geometry editor display, which can help allow precise placement of new vertices relative to those map components.

    Alternatively, you can set opacity separately on each of the symbols used by this style, allowing you to make specific aspects of the geometry editor semi-transparent.

    See also setOpacity() and GeometryEditor::isVisible.

    [since Esri::ArcGISRuntime 200.2] Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::rotateHandleSymbol() const

    Returns the symbol used to draw a control handle for interactive rotation of the selected element, when a rotatable element is selected in the GeometryEditor and InteractionConfiguration::isAllowRotatingSelectedElement is true.

    When the GeometryEditor::selectedElement is rotatable, this symbol displays a control handle to allow interactive rotation of the element. The handle is drawn above the top of the bounding box (see boundingBoxSymbol). If the selected element cannot be rotated (see GeometryEditorElement::canRotate) then this symbol is ignored and no rotation handle is drawn.

    The default symbol is a black circular arrow advanced marker symbol. Use either a MarkerSymbol or an appropriate advanced symbol if setting this property.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also setRotateHandleSymbol(), InteractionConfiguration::isAllowRotatingSelectedElement, and GeometryEditor::rotateSelectedElement(double, Point).

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::selectedMidVertexSymbol() const

    Returns the symbol used to draw the currently selected mid-vertex of the current geometry when editing polygon or polyline geometries.

    When a mid-vertex is selected, it is displayed with this symbol instead of midVertexSymbol.

    As soon as a mid-vertex is moved interactively, it is replaced by a vertex that is part of the GeometryEditor::geometry, and is displayed with the selectedVertexSymbol.

    See also setSelectedMidVertexSymbol(), midVertexSymbol, selectedVertexSymbol, and GeometryEditorMidVertex.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::selectedVertexSymbol() const

    Returns the symbol used to draw the currently selected vertex of the current geometry when editing any geometry type.

    This symbol can be used to emphasize the currently selected vertex, which can be useful if you require extra emphasis in addition to the selection halo, or wish to make the selected vertex a larger target for user interactions.

    See also setSelectedVertexSymbol(), vertexSymbol, selectedMidVertexSymbol, and GeometryEditorVertex.

    [since Esri::ArcGISRuntime 200.2] void GeometryEditorStyle::setBoundingBoxHandleSymbol(Esri::ArcGISRuntime::Symbol *boundingBoxHandleSymbol)

    Sets the boundingBoxHandleSymbol to boundingBoxHandleSymbol.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also boundingBoxHandleSymbol.

    [since Esri::ArcGISRuntime 200.2] void GeometryEditorStyle::setBoundingBoxSymbol(Esri::ArcGISRuntime::Symbol *boundingBoxSymbol)

    Sets the boundingBoxSymbol to boundingBoxSymbol.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also boundingBoxSymbol.

    void GeometryEditorStyle::setFeedbackLineSymbol(Esri::ArcGISRuntime::Symbol *feedbackLineSymbol)

    Sets the feedbackLineSymbol to feedbackLineSymbol.

    See also feedbackLineSymbol.

    void GeometryEditorStyle::setFeedbackVertexSymbol(Esri::ArcGISRuntime::Symbol *feedbackVertexSymbol)

    Sets the feedbackVertexSymbol to feedbackVertexSymbol.

    See also feedbackVertexSymbol.

    void GeometryEditorStyle::setFillSymbol(Esri::ArcGISRuntime::Symbol *fillSymbol)

    Sets the fillSymbol to fillSymbol.

    See also fillSymbol.

    void GeometryEditorStyle::setLineSymbol(Esri::ArcGISRuntime::Symbol *lineSymbol)

    Sets the lineSymbol to lineSymbol.

    See also lineSymbol.

    void GeometryEditorStyle::setMidVertexSymbol(Esri::ArcGISRuntime::Symbol *midVertexSymbol)

    Sets the midVertexSymbol to midVertexSymbol.

    See also midVertexSymbol.

    void GeometryEditorStyle::setOpacity(float opacity)

    Sets the opacity to opacity.

    See also opacity.

    [since Esri::ArcGISRuntime 200.2] void GeometryEditorStyle::setRotateHandleSymbol(Esri::ArcGISRuntime::Symbol *rotateHandleSymbol)

    Sets the rotateHandleSymbol to rotateHandleSymbol.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also rotateHandleSymbol.

    void GeometryEditorStyle::setSelectedMidVertexSymbol(Esri::ArcGISRuntime::Symbol *selectedMidVertexSymbol)

    Sets the selectedMidVertexSymbol to selectedMidVertexSymbol.

    See also selectedMidVertexSymbol.

    void GeometryEditorStyle::setSelectedVertexSymbol(Esri::ArcGISRuntime::Symbol *selectedVertexSymbol)

    Sets the selectedVertexSymbol to selectedVertexSymbol.

    See also selectedVertexSymbol.

    void GeometryEditorStyle::setVertexSymbol(Esri::ArcGISRuntime::Symbol *vertexSymbol)

    Sets the vertexSymbol to vertexSymbol.

    See also vertexSymbol.

    void GeometryEditorStyle::setVertexTextSymbol(Esri::ArcGISRuntime::Symbol *vertexTextSymbol)

    Sets the vertexTextSymbol to vertexTextSymbol.

    See also vertexTextSymbol.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::vertexSymbol() const

    Returns the symbol used to draw the vertices of the current geometry when editing any geometry type.

    Setting a larger symbol can help users on touch devices select and work with vertices, especially for field apps where users may wear thick gloves that work with touch screens.

    If nullptr, the vertices of the geometry are not explicitly displayed. By default when using a FreehandTool, this is nullptr, as you work with geometry parts instead of individual vertices. For a VertexTool, consider your workflow carefully before setting this property to nullptr, as you must be able to see vertices in order to select, move, or otherwise interact with them.

    See also setVertexSymbol(), selectedVertexSymbol, vertexTextSymbol, and midVertexSymbol.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::vertexTextSymbol() const

    Returns the symbol used to draw vertex numbers for the current geometry. If nullptr, no numbers are displayed.

    By default when using a FreehandTool, this symbol is nullptr.

    See also setVertexTextSymbol().

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