A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-geometryeditor.html below:

GeometryEditor Class | ArcGIS Maps SDK for Qt

Allows you to create new geometries, and change existing geometries, by interacting with a MapView. More...

Member Function Documentation [explicit] GeometryEditor::GeometryEditor(QObject *parent = nullptr)

Creates a default GeometryEditor.

[override virtual noexcept] GeometryEditor::~GeometryEditor()

Destructor.

bool GeometryEditor::canRedo() const

Returns true if there are actions that can be redone on the geometry, false otherwise.

This applies to both programmatic and interactive changes to the geometry and is useful for enabling or disabling a UI control for redo actions.

The value of canRedo changes, raising the canRedoChanged event, when:

See also redo and canUndo.

[signal] void GeometryEditor::canRedoChanged()

Emits this signal when canRedo changes.

bool GeometryEditor::canUndo() const

Returns true if there are actions that can be undone on the geometry, false otherwise.

This applies to both programmatic and interactive changes to the geometry and is useful for enabling or disabling a UI control for undo actions.

The value of canUndo changes, raising the canUndoChanged event, when:

See also undo and canRedo.

[signal] void GeometryEditor::canUndoChanged()

Emits this signal when canUndo changes.

[since Esri::ArcGISRuntime 200.8] void GeometryEditor::cancelCurrentAction()

Cancels the current action.

Cancels any current ongoing move and any picked up vertex is returned to its original position. For example, a vertex may be picked up using the ReticleVertexTool via tap interaction or ProgrammaticReticleTool::pickUpSelectedElement. The picked up vertex can be returned to its original position by cancelling the pick up action with cancelCurrentAction.

This function was introduced in Esri::ArcGISRuntime 200.8.

void GeometryEditor::clearGeometry()

Clears the current geometry being edited.

Sets geometry to an empty geometry (Geometry::isEmpty = true). The GeometryType is maintained - to edit a different type of geometry, restart the GeometryEditor with the required type.

See also clearSelection.

void GeometryEditor::clearSelection()

Clears the current geometry being edited.

Sets geometry to an empty geometry (Geometry::isEmpty = true). The GeometryType is maintained - to edit a different type of geometry, restart the GeometryEditor with the required type.

See also clearGeometry.

void GeometryEditor::deleteSelectedElement()

Deletes the selected element from the current geometry.

To clear the selection, but leave the state of the geometry unchanged, call clearSelection instead.

See also selectedElement and InteractionConfiguration::setAllowDeletingSelectedElement.

Esri::ArcGISRuntime::Geometry GeometryEditor::geometry() const

Returns the current geometry, updated as you interact with the view.

The geometry returned depends on the state of the GeometryEditor:

If the GeometryEditor was started by calling start(const Esri::ArcGISRuntime::Geometry&), then the geometry is returned in the same SpatialReference as the input geometry. If the input geometry spatial reference is empty, or the editor was started using start(Esri::ArcGISRuntime::GeometryType), then the geometry is returned in the spatial reference of the associated MapView. If no spatial reference is set on either input geometry or via an associated map view, then the spatial reference of the geometry will be empty.

Editing feature data that is reprojected on the fly can introduce spatial errors into the data. When accuracy is important, best practice is to use a spatial reference for the map view which matches the feature layer geometry you are editing. The ArcGIS Pro editing help topic Introduction to projection on the fly contains further advice.

The value of geometry changes, raising the geometryChanged, when:

See also selectedElementChanged.

[signal] void GeometryEditor::geometryChanged()

Emits this signal when geometry changes.

[since Esri::ArcGISRuntime 200.8] Esri::ArcGISRuntime::GeometryEditorHoverable *GeometryEditor::hoveredElement() const

Returns the element that is currently hovered over in the GeometryEditor, or nullptr if nothing is hovered over.

When the current tool is a ReticleTool the hovered element is the element under the reticle. When the current tool is not a ReticleTool the hovered element is the element under the cursor or pointer. The value of hoveredElement changes, raising the hoveredElementChanged event, when:

It may also change when:

This function was introduced in Esri::ArcGISRuntime 200.8.

[signal] void GeometryEditor::hoveredElementChanged()

Emits this signal when hoveredElement changes.

void GeometryEditor::insertVertex(const Esri::ArcGISRuntime::Point &point)

Returns a new vertex at the specified location and inserts it after the currently selected element, or appends the point if there is nothing selected.

If geometry is empty (Geometry::isEmpty is true), the given point is added as the initial vertex, and then selected. If nothing is selected (selectedElement is empty), the point is appended to the end of the geometry, and then selected. If selectedElement is the first vertex in a part of a Multipart, the given point is inserted before the currently selected vertex, and then selected.

If point is z-aware (Point::hasZ = true), this method will change the geometry to be z-aware, if it is not already.

If geometry is a non-empty Point, this method replaces the existing point with the given point, and selects it.

See also InteractionConfiguration::setAllowVertexCreation.

bool GeometryEditor::isStarted() const

Returns true if an editing session is active, false otherwise.

When true, interactions with the view can affect the state of the geometry or selectedElement.

{start(const Esri::ArcGISRuntime::Geometry&)}, {Esri::ArcGISRuntime::GeometryEditor::start(Esri::ArcGISRuntime::GeometryType)} {start(Esri::ArcGISRuntime::GeometryType)}, {Esri::ArcGISRuntime::GeometryEditor::stop} {stop}

See also Esri::ArcGISRuntime::GeometryEditor::start(const Esri::ArcGISRuntime::Geometry&).

[signal] void GeometryEditor::isStartedChanged()

Emits this signal when isStarted changes.

bool GeometryEditor::isVisible() const

Returns true if the geometry is visible in the view, false otherwise.

See also GeometryEditorStyle::opacity.

void GeometryEditor::moveSelectedElement(const Esri::ArcGISRuntime::Point &newPoint)

Moves the selected element to the specified location.

If selectedElement is a GeometryEditorVertex, then the location of the vertex is moved to the given point. If the selectedElement is any other type of GeometryEditorElement, then the center of the element is moved to the given point.

See also InteractionConfiguration::setAllowMovingSelectedElement.

void GeometryEditor::moveSelectedElement(double deltaX, double deltaY)

Moves the selected element by the specified distances along the x-axis and y-axis.

{InteractionConfiguration::setAllowMovingSelectedElement}, {Esri::ArcGISRuntime::GeometryEditor::moveSelectedElement(const Esri::ArcGISRuntime::Point&)} {moveSelectedElement(const Esri::ArcGISRuntime::Point&)}, {Esri::ArcGISRuntime::GeometryEditor::rotateSelectedElement(double, const Esri::ArcGISRuntime::Point&)} {rotateSelectedElement(double, const Esri::ArcGISRuntime::Point&)}, {Esri::ArcGISRuntime::GeometryEditor::scaleSelectedElement(double, double, const Esri::ArcGISRuntime::Point&)} {scaleSelectedElement(double, double, const Esri::ArcGISRuntime::Point&)}

See also Esri::ArcGISRuntime::InteractionConfiguration::setAllowMovingSelectedElement.

[since Esri::ArcGISRuntime 200.8] Esri::ArcGISRuntime::GeometryEditorElement *GeometryEditor::pickedUpElement() const

Returns the element that an attached ReticleTool has picked up in order to move it.

This will be nullptr if the current tool is not the ReticleTool or nothing is picked up. The picked up element can be a GeometryEditorVertex or a GeometryEditorMidVertex. Only one element can be picked up at a time. The value of pickedUpElement changes, raising the pickedUpElementChanged event, when:

This function was introduced in Esri::ArcGISRuntime 200.8.

See also ReticleVertexTool, ProgrammaticReticleTool::pickUpSelectedElement, and ProgrammaticReticleTool::placeElementAtReticle.

[signal] void GeometryEditor::pickedUpElementChanged()

Emits this signal when pickedUpElement changes.

void GeometryEditor::redo()

Redoes the last action undone on the geometry.

See also canRedo, undo, and canRedoChanged.

void GeometryEditor::replaceGeometry(const Esri::ArcGISRuntime::Geometry &geometry)

Replaces the current geometry with the specified geometry.

Use this method to make changes to the geometry that are not directly supported using other GeometryEditor methods. For example, to start a new part in a Polygon or Polyline geometry, get the current geometry, use a MultipartBuilder to add the required part, and then pass the updated GeometryBuilder::toGeometry to this method.

[since Esri::ArcGISRuntime 200.2] void GeometryEditor::rotateSelectedElement(double angle, const Esri::ArcGISRuntime::Point &origin)

Rotates the selectedElement by the specified angle.

The angle of rotation is used in the form of the modulo of 360 degrees; for example rotating by 540 degrees is equivalent to rotating the by 180 degrees. A positive value corresponds to a counterclockwise rotation.

If the origin Point has a different SpatialReference than the associated MapView, the point will be reprojected before the geometry is rotated, using the default transformation.

If selectedElement is a GeometryEditorVertex, or a GeometryEditorGeometry of type Point, and the origin parameter is empty (or is at the same location as the selected element), then rotating the selected element has no effect.

{moveSelectedElement(double, double)}, {Esri::ArcGISRuntime::GeometryEditor::moveSelectedElement(const Esri::ArcGISRuntime::Point&)} {moveSelectedElement(const Esri::ArcGISRuntime::Point&)}, {Esri::ArcGISRuntime::GeometryEditor::scaleSelectedElement(double, double, const Esri::ArcGISRuntime::Point&)} {scaleSelectedElement(double, double, const Esri::ArcGISRuntime::Point&)}, {Esri::ArcGISRuntime::InteractionConfiguration::isAllowRotatingSelectedElement} {InteractionConfiguration::isAllowRotatingSelectedElement}, {Esri::ArcGISRuntime::GeometryEngine::rotate(const Esri::ArcGISRuntime::Geometry&, double, const Esri::ArcGISRuntime::Point&)} {GeometryEngine::rotate(const Esri::ArcGISRuntime::Geometry&, double, const Esri::ArcGISRuntime::Point&)}

This function was introduced in Esri::ArcGISRuntime 200.2.

See also Esri::ArcGISRuntime::GeometryEditor::moveSelectedElement(double, double).

[since Esri::ArcGISRuntime 200.2] void GeometryEditor::scaleSelectedElement(double scaleX, double scaleY, const Esri::ArcGISRuntime::Point &origin)

Scales the selected element by the specified factors.

If the origin Point has a different SpatialReference than the associated MapView, the point will be reprojected before the geometry is rotated, using the default transformation.

Positive scale factors greater than 1 increase the size of the geometry, and positive factors between 0 and 1 reduce the size of the geometry. Negative scale factors produce a geometry reflected across the axes of the origin point. Negative factors less than -1 both reflect and increase the size of the geometry, and negative factors between -1 and 0 both reflect and reduce the size of the geometry.

{moveSelectedElement(double, double)}, {Esri::ArcGISRuntime::GeometryEditor::moveSelectedElement(const Esri::ArcGISRuntime::Point&)} {moveSelectedElement(const Esri::ArcGISRuntime::Point&)}, {Esri::ArcGISRuntime::GeometryEditor::rotateSelectedElement(double, const Esri::ArcGISRuntime::Point&)} {rotateSelectedElement(double, const Esri::ArcGISRuntime::Point&)}, {Esri::ArcGISRuntime::InteractionConfiguration::isAllowScalingSelectedElement} {InteractionConfiguration::isAllowScalingSelectedElement}, {Esri::ArcGISRuntime::GeometryEngine::scale(const Esri::ArcGISRuntime::Geometry&, double, double, const Esri::ArcGISRuntime::Point&)} {GeometryEngine::scale(const Esri::ArcGISRuntime::Geometry&, double, double, const Esri::ArcGISRuntime::Point&)}

This function was introduced in Esri::ArcGISRuntime 200.2.

See also Esri::ArcGISRuntime::GeometryEditor::moveSelectedElement(double, double).

void GeometryEditor::selectGeometry()

Selects the entire geometry.

When the entire geometry is selected it can be edited interactively and programmatically. For example you can move the entire geometry interactively by dragging, or call moveSelectedElement(const Esri::ArcGISRuntime::Point&) or moveSelectedElement(double, double) to move it programmatically.

When the entire geometry is selected, the GeometryEditorGeometry returned from selectedElement has a geometry equal to geometry. If the geometry is a Point, then a GeometryEditorVertex is returned from selectedElement instead, which is equivalent to the entire geometry and provides immediate access to the x,y coordinates of the selected point geometry.

See also InteractionConfiguration::setAllowGeometrySelection, clearSelection, selectVertex(int, int), selectMidVertex(int, int), and selectPart(int).

void GeometryEditor::selectMidVertex(int partIndex, int segmentIndex)

Selects mid-vertex with specified indices.

Mid-vertices do not exist in the geometry. They exist only in the display to serve as a visual cue that new vertices can be inserted between existing vertices. Since they do not exist in the geometry, mid-vertices cannot be programmatically moved or deleted. They can be used to insert a new vertex interactively.

When a mid-vertex is selected, a GeometryEditorMidVertex is returned from selectedElement.

See also InteractionConfiguration::setAllowMidVertexSelection, clearSelection, selectVertex(int, int), selectMidVertex(int, int), and selectGeometry.

void GeometryEditor::selectPart(int partIndex)

Selects part with specified index.

When a part of a polygon or polyline geometry is selected, a GeometryEditorPart is returned from selectedElement. If the polygon or polyline has only one part, then a GeometryEditorGeometry with a shape equivalent to the entire geometry is returned from selectedElement instead, which provides immediate access to the extent (Geometry::extent) and can be directly used in other geometry operations. If the current geometry is a Point or Multipoint, the entire geometry is selected.

When a part of a Polygon or Polyline (Multipart) geometry is selected it can be edited separately from the other parts of the geometry. For example, you can move only the selected part interactively by dragging, or call moveSelectedElement(const Esri::ArcGISRuntime::Point&) or moveSelectedElement(double, double) to move only the selected part programmatically.

See also InteractionConfiguration::setAllowPartSelection, clearSelection, selectVertex(int, int), selectMidVertex(int, int), and selectGeometry.

void GeometryEditor::selectVertex(int partIndex, int vertexIndex)

Selects vertex with specified indices.

When a vertex is selected it can be edited while all other vertices of the geometry are unchanged. For example, you can move only the selected vertex interactively by dragging, or call moveSelectedElement(const Esri::ArcGISRuntime::Point&) or moveSelectedElement(double, double) to move the selected vertex programmatically.

When a vertex is selected, a GeometryEditorVertex is returned from selectedElement.

See also InteractionConfiguration::setAllowVertexSelection, clearSelection, selectVertex(int, int), selectMidVertex(int, int), and selectGeometry.

Esri::ArcGISRuntime::GeometryEditorElement *GeometryEditor::selectedElement() const

Returns the element that is currently selected in the GeometryEditor, or nullptr if nothing is selected.

Clicking or tapping on the different visible elements of a geometry in a view allows you to select and unselect them. This property returns a different type of GeometryEditorElement depending on what is selected - a vertex (GeometryEditorVertex), a mid-vertex (GeometryEditorMidVertex), a part of a polygon or polyline (GeometryEditorPart), or the entire geometry (GeometryEditorGeometry). You can change which selection interactions are allowed by using the InteractionConfiguration of the tool.

You can also programmatically select specific vertices (selectVertex(int, int)), mid-vertices (selectMidVertex(int, int)), parts of polygons or polylines (selectPart(int)), or the entire geometry (selectGeometry). You can clear the selection using clearSelection.

The value of selectedElement changes, raising the selectedElementChanged event, when:

It may also change when:

[signal] void GeometryEditor::selectedElementChanged()

Emits this signal when selectedElement changes.

[since Esri::ArcGISRuntime 200.4] void GeometryEditor::setSnapSettings(Esri::ArcGISRuntime::SnapSettings *snapSettings)

Sets the snapSettings to snapSettings.

This function was introduced in Esri::ArcGISRuntime 200.4.

See also snapSettings.

void GeometryEditor::setTool(Esri::ArcGISRuntime::GeometryEditorTool *tool)

Sets the tool to tool.

See also tool.

void GeometryEditor::setVisible(bool visible)

Sets the visible to visible.

See also isVisible.

[signal, since Esri::ArcGISRuntime 200.6] void GeometryEditor::snapChanged(Esri::ArcGISRuntime::SnapChangedInfo *snapChangedInfo)

Signal emitted when the snap info has changed.

This function was introduced in Esri::ArcGISRuntime 200.6.

[since Esri::ArcGISRuntime 200.4] Esri::ArcGISRuntime::SnapSettings *GeometryEditor::snapSettings() const

Returns configurable options for interactive snapping.

Snapping allows you to create geometries that connect to each other and are coincident, so that interactive edits are more accurate, with fewer errors. Snapping is disabled by default - see SnapSettings for information about setting up snapping workflows.

This function was introduced in Esri::ArcGISRuntime 200.4.

See also setSnapSettings().

void GeometryEditor::start(Esri::ArcGISRuntime::GeometryType geometryType)

Starts a geometry editing session with an empty geometry of the specified GeometryType.

Use this method for data creation workflows, where you know the GeometryType required but do not have an existing geometry to edit. After calling this method, nothing is drawn on the map view initially - user interactions on the map view will define and edit the geometry, depending on the current tool.

GeometryEditor can be used to create Point, Multipoint, Polygon, and Polyline geometries - however FreehandTool, and ShapeTool are suitable for creating Polygon, and Polyline geometries only.

The new geometry will have the SpatialReference of the map view. You can use GeometryEngine::project(const Esri::ArcGISRuntime::Geometry&, const Esri::ArcGISRuntime::SpatialReference&) or GeometryEngine::project(const Esri::ArcGISRuntime::Geometry&, const Esri::ArcGISRuntime::SpatialReference&, Esri::ArcGISRuntime::DatumTransformation*) to project the final result geometry to a different spatial reference if required, for example when editing feature geometry. When accuracy is important, best practice is to use a spatial reference for the map view which matches the feature layer geometry you are creating. The ArcGIS Pro editing help topic Introduction to projection on the fly contains further advice.

void GeometryEditor::start(const Esri::ArcGISRuntime::Geometry &initialGeometry)

Starts a geometry editing session based on the specified geometry.

Use this method for data editing workflows, where you have an existing Geometry to be updated. After calling this method, the geometry is drawn in the map view, and interactions with the map view will select and edit the geometry, depending on the current tool and its InteractionConfiguration.

When the SpatialReference of the initial geometry differs from that of the map view, the display will project the geometry to the SpatialReference of the map view, using the default DatumTransformation, for display and user interactions. Editing feature data that is reprojected on the fly can introduce spatial errors into data. When accuracy is important, best practice is to use a spatial reference for the map view which matches the feature layer geometry you are editing. The ArcGIS Pro editing help topic Introduction to projection on the fly contains further advice.

Esri::ArcGISRuntime::Geometry GeometryEditor::stop()

Stops the editing session by making the GeometryEditor no longer respond to user interaction and clears the geometry.

See also geometry and geometryChanged.

Esri::ArcGISRuntime::GeometryEditorTool *GeometryEditor::tool() const

Returns the tool defining how you interact with the view to create and edit the geometry.

The default value is a VertexTool with all interactive operations enabled, providing a common way of editing points, multipoints, polygons, and polylines.

The tool can be replaced while a GeometryEditor is started (isStarted = true), enabling a combination of tools to be used to edit a geometry.

See also setTool(), VertexTool, FreehandTool, ShapeTool, and ReticleVertexTool.

[signal] void GeometryEditor::toolChanged()

Emits this signal when tool changes.

void GeometryEditor::undo()

Undoes the last action on the geometry.

See also canUndo, redo, and canUndoChanged.

[signal] void GeometryEditor::visibleChanged()

Emits this signal when isVisible changes.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4