Defines the user interface (form configuration) to display when editing a feature. More...
Member Function Documentation[override virtual noexcept]
FeatureForm::~FeatureForm()
Destructor.
[static]
Esri::ArcGISRuntime::FeatureForm *FeatureForm::create(Esri::ArcGISRuntime::ArcGISFeature *feature, QObject *parent = nullptr)
Creates a FeatureForm for the ArcGISFeature.
If the feature's FeatureLayer, ArcGISFeatureTable, or the SubtypeSublayer specific to the feature's FeatureSubtype has been authored with a FeatureFormDefinition, then this authored FeatureFormDefinition will be used to create the FeatureForm. If a FeatureFormDefinition is not found, a default definition is generated and used to create the FeatureForm.
Esri::ArcGISRuntime::AttachmentsFormElement *FeatureForm::defaultAttachmentsElement() constReturns a default AttachmentsFormElement for displaying and editing the feature's attachments.
Few of the tools used to author a FeatureForm support adding attachment elements. This default AttachmentsFormElement can be used to provide a default attachment editing experience to the users of your app, in lieu of an element from the authoring environment.
If the authoring environment the form was created in does support adding AttachmentsFormElement then this property will be nullptr
, and an attachment element will appear in elements as authored. If the ArcGISFeature does not support attachments, this property will be nullptr
.
Returns the feature form definition used to define the user interface for the form.
QString FeatureForm::description() constReturns a description of the form.
void FeatureForm::discardEdits()Discards edits to elements and their associated Feature::attributes.
Edits are discarded but the Feature is not refreshed. Values will be reset to the values at the time of FeatureForm creation.
QList<Esri::ArcGISRuntime::FormElement *> FeatureForm::elements() constReturns an ordered list of the elements contained by the form.
QFuture<QList<Esri::ArcGISRuntime::FormExpressionEvaluationError *>> FeatureForm::evaluateExpressionsAsync(QObject *parent = nullptr)Asynchronously evaluates all form expressions with an optional parent.
An expression can include Arcade FeatureSet functions, which need to be evaluated asynchronously. Upon completion the task provides a set of FormExpressionEvaluationError providing diagnostic information about errors encountered during evaluation of expressions. An empty list indicates no errors were encountered.
Also fully populates the elements and each placeholder is replaced by its value.
This method must be called before displaying the feature form in a UI so you can use synchronous methods on form elements. It should also be called after every call to FieldFormElement::updateValue(const QVariant&), in order to run any expressions which may depend on that value.
This method will load the feature if it is not already loaded.
This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.
See Working with QFuture for further details.
Esri::ArcGISRuntime::ArcGISFeature *FeatureForm::feature() constReturns the feature displayed in the form.
QFuture<void> FeatureForm::finishEditingAsync()Saves edits made using the FeatureForm to the database.
Commits changes to the ArcGISFeature and its attachments to the database. Note that calling FeatureTable::updateFeatureAsync(Esri::ArcGISRuntime::Feature*) manually is not required.
After calling this method, the FeatureForm should be dismissed and destroyed.
This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.
See Working with QFuture for further details.
bool FeatureForm::hasEdits() constReturns true
if edits have been made to this FeatureForm, false
otherwise.
This property tracks changes to FieldFormElement and AttachmentsFormElement. Once an edit has been made, this property will be true
until discardEdits or finishEditingAsync is called; even if elements are manually set to their original state.
[signal]
void FeatureForm::hasEditsChanged(bool hasEdits)
Signal emitted when the form's hasEdits property changes.
Returns true
if the value for a previously visible FieldFormElement is retained when it (or its parent) is hidden.
The default is false
, meaning the value is cleared when an element is hidden.
Returns the form title.
[signal]
void FeatureForm::titleChanged(const QString &title)
Signal emitted when the form's title property changes.
Returns a dictionary mapping from the FieldFormElement::fieldName to an array of errors for each field form element that is both visible and editable.
An empty dictionary indicates that all visible and editable field form element values are valid. Constraints are expressed by the FormInput and the value of FieldFormElement::isRequired of the element. The constraints depend on the type of FormInput. The errors returned for each key is an array of any of the following error types:
See also FieldFormElement::validationErrors.
[signal]
void FeatureForm::validationErrorsChanged(const QMap<QString, QList<Esri::ArcGISRuntime::Error>> &errors)
Signal emitted when the form's validationErrors property 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