Collection of GeometryEditor enumerations. More...
Header: | #include <GeometryEditorTypes.h> |
Types
(since Esri::ArcGISRuntime 200.1) enum class | GeometryEditorElementType { GeometryEditorGeometry, GeometryEditorPart, GeometryEditorVertex, GeometryEditorMidVertex } |
(since Esri::ArcGISRuntime 200.2) enum class | GeometryEditorScaleMode { Stretch, Uniform } |
(since Esri::ArcGISRuntime 200.1) enum class | GeometryEditorToolType { VertexTool, FreehandTool, ShapeTool, ReticleVertexTool } |
(since Esri::ArcGISRuntime 200.2) enum class | ShapeToolType { Arrow, Ellipse, Rectangle, Triangle } |
(since Esri::ArcGISRuntime 200.7) enum class | SnapRuleBehavior { None, RulesLimitSnapping, RulesPreventSnapping } |
(since Esri::ArcGISRuntime 200.7) enum class | SnapSourceEnablingBehavior { Preserve, SetFromRules } |
(since Esri::ArcGISRuntime 200.6) enum class | SnapState { Unsnapped, SnappedToFeature, SnappedToGeometryGuide } |
Detailed Description
Type Documentation
[since Esri::ArcGISRuntime 200.1]
enum class GeometryEditorElementType
Identifies the type of a GeometryEditorElement.
The GeometryEditorElementType can be one of:
Constant | Value | Description |
---|---|---|
GeometryEditorElementType::GeometryEditorGeometry | 0 | The entire GeometryEditor::geometry. See: GeometryEditorGeometry. |
GeometryEditorElementType::GeometryEditorPart | 1 | A single part in a Polyline or Polygon. See: GeometryEditorPart. |
GeometryEditorElementType::GeometryEditorVertex | 2 | A vertex in a Point, Multipoint, Polyline, or Polygon. See: GeometryEditorMidVertex. |
GeometryEditorElementType::GeometryEditorMidVertex | 3 | A mid-vertex in a Polyline or Polygon. See: GeometryEditorMidVertex |
This enum was introduced in Esri::ArcGISRuntime 200.1.
[since Esri::ArcGISRuntime 200.2]
enum class GeometryEditorScaleMode
Determines how a geometry can be interactively scaled (resized) while using the GeometryEditor.
Set the InteractionConfiguration::scaleMode property to one of the values to determine interactive scaling behavior of a GeometryEditor. Additionally, this value also determines how the initial shape is created when using the ShapeTool. See: InteractionConfiguration::scaleMode, and GeometryEditor::scaleSelectedElement.
The GeometryEditorScaleMode can be one of:
Constant | Value | Description |
---|---|---|
GeometryEditorScaleMode::Stretch | 0 | The geometry can be scaled freely and the aspect ratio is not preserved. |
GeometryEditorScaleMode::Uniform | 1 | The geometry can be scaled proportionally, preserving the original aspect ratio. |
This enum was introduced in Esri::ArcGISRuntime 200.2.
[since Esri::ArcGISRuntime 200.1]
enum class GeometryEditorToolType
Identifies the type of a GeometryEditorTool.
The GeometryEditorToolType can be one of:
Constant | Value | Description |
---|---|---|
GeometryEditorToolType::VertexTool | 0 | A VertexTool. |
GeometryEditorToolType::FreehandTool | 1 | A FreehandTool. |
GeometryEditorToolType::ShapeTool | 2 | A ShapeTool (since 200.2). |
GeometryEditorToolType::ReticleVertexTool | 3 | A ReticleVertexTool (since 200.5). |
This enum was introduced in Esri::ArcGISRuntime 200.1.
[since Esri::ArcGISRuntime 200.2]
enum class ShapeToolType
Identifies the type of a ShapeTool.
The ShapeToolType can be one of:
Constant | Value | Description |
---|---|---|
ShapeToolType::Arrow | 0 | Allows you to drag on a map view to define the corners of a bounding box within which an arrow-shaped geometry fits. The created arrow shape is aligned along the horizontal axis, pointing in the direction of the drag. To create arrows pointing in other directions, ensure Esri::ArcGISRuntime::InteractionConfiguration::isAllowRotatingSelectedElement and Esri::ArcGISRuntime::InteractionConfiguration::isAllowPartSelection are true to allow interactive selection and rotation to the desired direction. |
ShapeToolType::Ellipse | 1 | Allows you to drag on a map view to define the center point and a point on the circumference of an ellipse-shaped geometry. To create a circular shape, use this value in combination with a Esri::ArcGISRuntime::ShapeTool::configuration InteractionConfiguration::scaleMode value of GeometryEditorScaleMode::Uniform. Geometries created using this type are not represented by true curves but rather consist of a series of straight lines (Esri::ArcGISRuntime::Geometry::hasCurves is false ). |
ShapeToolType::Rectangle | 2 | Allows you to drag on a map view to define the corners of a bounding box within which a rectangle-shaped geometry fits. To create a square shape, use this value in combination with a Esri::ArcGISRuntime::ShapeTool::configuration InteractionConfiguration::scaleMode value of GeometryEditorScaleMode::Uniform. Geometries created using this type are either polygons or polylines, depending on the parameter passed to GeometryEditor::start(Esri::ArcGISRuntime::GeometryType) - it cannot create an Envelope geometry. |
ShapeToolType::Triangle | 3 | Allows you to drag on a map view to define the center point and a corner of a triangle-shaped geometry. The created triangle shape is aligned along the vertical axis, pointing opposite to the direction of the drag. To create triangles pointing in other directions, ensure Esri::ArcGISRuntime::InteractionConfiguration::isAllowRotatingSelectedElement and Esri::ArcGISRuntime::InteractionConfiguration::isAllowPartSelection are true to allow interactive selection and rotation to the desired direction. To create an equilateral triangle, use this value in combination with a Esri::ArcGISRuntime::ShapeTool::configuration Esri::ArcGISRuntime::InteractionConfiguration::scaleMode value of GeometryEditorScaleMode::Uniform. |
This enum was introduced in Esri::ArcGISRuntime 200.2.
[since Esri::ArcGISRuntime 200.7]
enum class SnapRuleBehavior
Describes how SnapRules affects the interactive snapping behavior of a SnapSource.
When rule-based snapping is configured on a GeometryEditor, each SnapSourceSettings::ruleBehavior indicates the snapping behavior for the snap source, based on the SnapRules that were passed to SnapSettings::syncSourceSettings(Esri::ArcGISRuntime::SnapRules*, Esri::ArcGISRuntime::SnapSourceEnablingBehavior). For more information about configuring a GeometryEditor to use rule-based snapping, see SnapRules.
Each SnapSourceSettings can be enabled or disabled independently of its SnapSourceSettings::ruleBehavior - see SnapSourceSettings::isEnabled for a summary of the other configuration options that can affect interactive snapping.
When snapping is configured without rule-based snapping (by calling SnapSettings::syncSourceSettings), all SnapSourceSettings::ruleBehavior values will be SnapRuleBehavior::None.
The SnapRuleBehavior can be one of:
Constant | Value | Description |
---|---|---|
SnapRuleBehavior::None | 0 | There are no applicable snap rules for this SnapSource, snapping behavior is determined by SnapSourceSettings::isEnabled. This value is used in the following situations:
|
You can set SnapSourceSettings::isEnabled to true
for these snap sources if snapping is nevertheless appropriate for your specific scenario, or delegate the choice to the end user in your UI. When enabled (SnapSourceSettings::isEnabled is true
), the user can interactively snap to geometry edges (segments) and vertices of any feature in the snap source.
When syncing with SnapSourceEnablingBehavior::SetFromRules, any new SnapSourceSettings objects added to the SnapSettings::sourceSettings collection that have SnapRuleBehavior::None will have the default SnapSourceSettings::isEnabled value. Any SnapSourceSettings objects that already exist in the collection, due to previous synchronize calls, will be unaffected.
Constant | Value | Description |
---|---|---|
SnapRuleBehavior::RulesLimitSnapping | 1 | This value is returned from SnapSourceSettings::ruleBehavior when SnapRules::createAsync(Esri::ArcGISRuntime::UtilityNetwork*, Esri::ArcGISRuntime::UtilityAssetType*, QObject*) or SnapRules::createAsync(Esri::ArcGISRuntime::UtilityNetwork*, Esri::ArcGISRuntime::FeatureTable*, const QVariantMap&, QObject*) determined that the given asset type can be geometrically coincident with certain features in the applicable snap source. |
These rules limit the snapping in applicable ways, based on the logical connectivity of the items. They may be snapped to based on attributes. For example, rules may be defined that prevent snapping a metal water pipe to a plastic water pipe junction if these components are physically incompatible, but allow snapping to a compatible metal pipe junction.
Rules may also limit which parts of the snap source geometries can be snapped to, based on a connectivity policy (UtilityConnectivityPolicy). For example a connectivity rule may require that a fuse asset is only connected to a power line asset at one of its end points (the first or last vertex in the line), and therefore snapping at endpoints will be allowed, but snapping to the power line midspan (along a segment) will be prevented.
Visual snapping cues will guide the user to only the appropriate types of connectivity.
These snap sources will always be based on data from the UtilityNetwork used to create the SnapRules.
Constant | Value | Description |
---|---|---|
SnapRuleBehavior::RulesPreventSnapping | 2 | Rules specify that the asset type being edited should not snap to any features in the snap source. This value is returned from SnapSourceSettings::ruleBehavior when SnapRules::createAsync(Esri::ArcGISRuntime::UtilityNetwork*, Esri::ArcGISRuntime::UtilityAssetType*, QObject*) determined that the given asset type should not be geometrically coincident with features in the applicable snap source. In this case, interactive snaps to features in the snap source are prevented because the utility network data model indicates this is not a logical connection and the features should not be geometrically coincident. For example an electric fuse device feature cannot be coincident with another electric fuse device, as two devices cannot be in the same physical location, and snapping is prevented in this case. |
If providing the ability for a user to enable or disable snap sources in your app you may wish to exclude these snap sources from any list to simplify the user experience, because the sources cannot actually be snapped to regardless of the value of SnapSourceSettings::isEnabled.
These snap sources will always be based on data from the UtilityNetwork used to create the SnapRules.
This enum was introduced in Esri::ArcGISRuntime 200.7.
[since Esri::ArcGISRuntime 200.7]
enum class SnapSourceEnablingBehavior
Controls how snap sources are enabled when calling SnapSettings::syncSourceSettings(Esri::ArcGISRuntime::SnapRules*, Esri::ArcGISRuntime::SnapSourceEnablingBehavior).
The SnapSourceEnablingBehavior can be one of:
Constant | Value | Description |
---|---|---|
SnapSourceEnablingBehavior::Preserve | 0 | Preserves SnapSourceSettings::isEnabled values. When passed to SnapSettings::syncSourceSettings(Esri::ArcGISRuntime::SnapRules*, Esri::ArcGISRuntime::SnapSourceEnablingBehavior), all new SnapSourceSettings added to the SnapSettings::sourceSettings collection will have the default SnapSourceSettings::isEnabled value of false , and existing SnapSourceSettings will be unaffected. |
SnapSourceEnablingBehavior::SetFromRules | 1 | Enables SnapSourceSettings that have rule-based snapping behaviors. When passed to SnapSettings::syncSourceSettings(Esri::ArcGISRuntime::SnapRules*, Esri::ArcGISRuntime::SnapSourceEnablingBehavior), all SnapSourceSettings in the SnapSettings::sourceSettings collection with a SnapSourceSettings::ruleBehavior of SnapRuleBehavior::RulesPreventSnapping or SnapRuleBehavior::RulesLimitSnapping will have SnapSourceSettings::isEnabled set to true . |
Any new SnapSourceSettings added to the SnapSettings::sourceSettings collection with a SnapSourceSettings::ruleBehavior of SnapRuleBehavior::None will have a SnapSourceSettings::isEnabled value of false
, and existing SnapSourceSettings with a SnapSourceSettings::ruleBehavior of SnapRuleBehavior::None will be unaffected.
This enum was introduced in Esri::ArcGISRuntime 200.7.
[since Esri::ArcGISRuntime 200.6]
enum class SnapState
The resulting snap state when snapping to or from a snap candidate.
The SnapState can be one of:
Constant | Value | Description |
---|---|---|
SnapState::Unsnapped | 0 | The previous snap candidate is no longer suitable and the current edit position is not snapped. |
SnapState::SnappedToFeature | 1 | A snap has occurred to a SnapSource. This value will be returned in the following cases:
|
Note that if the snap contains multiple candidates, where some are from features/graphics and some are from geometry guides, then SnapState::SnappedToFeature will take priority over SnapState::SnappedToGeometryGuide.
This value will not be returned in these cases:
- When there is a change in snap point but not snap candidate. For example, moving from a snap point on a polyline segment to another snap point on the same polyline segment.
- When moving around a feature or graphic such that the snap point and snap candidate do not change.
Constant | Value | Description |
---|---|---|
SnapState::SnappedToGeometryGuide | 2 | A snap has occurred to a geometry guide. This value will be returned in the following cases:
|
This value will not be returned in these cases:
- When there is a change in snap point but not snap candidate. For example, moving from a snap point on a geometry guide to another snap point on the same geometry guide.
- When moving around a geometry guide such that the snap point and snap candidate do not change.
This enum was introduced in Esri::ArcGISRuntime 200.6.