A popup manager that contains helper properties and methods to allow developers to easily build their own UI for pop-ups. More...
This class is deprecated. We strongly advise against using it in new code.
Member Function Documentation[explicit]
PopupManager::PopupManager(Esri::ArcGISRuntime::Popup *popup, QObject *parent = nullptr)
Creates a PopupManager to manage the specified popup. If the GeoElement associated with the popup implements Loadable it must be loaded for the PopupManager to work properly.
[override virtual noexcept]
PopupManager::~PopupManager()
Destructor.
[since Esri::ArcGISRuntime 100.1]
Esri::ArcGISRuntime::PopupAttachmentManager *PopupManager::attachmentManager() const
Returns the PopupAttachmentManager for this PopupManager.
Returns null
if there is no associated PopupAttachmentManager.
Note: Getter function for property attachmentManager.
This function was introduced in Esri::ArcGISRuntime 100.1.
[invokable]
void PopupManager::cancelEditing()
Cancels the editing of the popup.
This rolls the GeoElement back to its original state. Any edits that have been made since starting will be discarded.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[since Esri::ArcGISRuntime 100.14]
QMap<QString, Esri::ArcGISRuntime::Error> PopupManager::contingencyValidationErrors() const
Returns the pairs of field group name and an associated contingent values validation error.
Errors are reported in validation when editing is defined as restrictive in the FieldGroup.
This function was introduced in Esri::ArcGISRuntime 100.14.
[since Esri::ArcGISRuntime 100.14]
QMap<QString, Esri::ArcGISRuntime::Error> PopupManager::contingencyValidationWarnings() const
Returns the pairs of field group name and an associated contingent values validation warning.
Warnings are reported in validation when editing is defined as non-restrictive in the FieldGroup.
This function was introduced in Esri::ArcGISRuntime 100.14.
[since Esri::ArcGISRuntime 100.14]
Esri::ArcGISRuntime::ContingentValuesResult *PopupManager::contingentValuesForField(Esri::ArcGISRuntime::PopupField *field) const
Returns the result that contain values for each FieldGroup the Field belongs to and all groups if there is more than one field group (the intersection of the values for each field group).
This function was introduced in Esri::ArcGISRuntime 100.14.
QString PopupManager::customHtmlDescription() constReturns the text to display as the custom HTML description.
If PopupDefinition::expressions is not empty, the custom HTML description may be using expressions with Arcade FeatureSet functions. Use PopupManager::evaluateExpressionsAsync() to evaluate the Arcade expressions before trying to get the PopupManager::customHtmlDescription() otherwise it may not return the correct description.
Note: Getter function for property customHtmlDescription.
Esri::ArcGISRuntime::PopupAttributeListModel *PopupManager::displayedFields() constReturns the fields for display use as a PopupAttributeListModel.
Note: Getter function for property displayedFields.
bool PopupManager::doesChangeRequireNotification(const Esri::ArcGISRuntime::FeatureTemplate &featureTemplate) constReturns a bool that determines whether whether changing to the specified FeatureTemplate requires warning the user that some data may be overwritten by the change.
Returns the Domain associated with a given PopupField if there is any.
Returns the current edit summary.
Note: Getter function for property editSummary.
Esri::ArcGISRuntime::PopupAttributeListModel *PopupManager::editableFields() constReturns the editable fields as a PopupAttributeListModel.
Note: Getter function for property editableFields.
[signal]
void PopupManager::editingCompleted(const Esri::ArcGISRuntime::Error &errors)
Signal emitted when editing completes after finishEditing is called.
Returns the GeometryBuilder used to edit the GeoElement's geometry.
See also setEditingGeometryBuilder().
[since Esri::ArcGISRuntime 200.2]
QFuture<QList<Esri::ArcGISRuntime::PopupExpressionEvaluation *>> PopupManager::evaluateExpressionsAsync(QObject *parent = nullptr)
Asynchronously evaluates all expressions, including Arcade FeatureSet functions available at PopupDefinition::expressions.
This method must be called before displaying the popup information in a UI and after finishEditing so you can use the synchronous methods formattedValue(Esri::ArcGISRuntime::PopupField*), substitute(const QString&), and the customHtmlDescription property to get the formatted QString representation. If there are no PopupDefinition::expressions then result array will be empty.
The PopupExpression may be used in the PopupDefinition::fields, PopupDefinition::media, PopupDefinition::title and PopupDefinition::description.
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.
This function was introduced in Esri::ArcGISRuntime 200.2.
[since Esri::ArcGISRuntime 100.14]
QList<Esri::ArcGISRuntime::PopupElement *> PopupManager::evaluatedElements() const
Returns a QList of PopupElement objects evaluated asynchronously by evaluateExpressionsAsync.
During the evaluation, the ExpressionPopupElement are replaced by the PopupElement returned by the Arcade expression. If the Arcade expression returns a list of attributes to use by the popup element, these attributes will be used by formattedValue(Esri::ArcGISRuntime::PopupField*) or fieldValue(Esri::ArcGISRuntime::PopupField*).
The QList is empty while evaluateExpressionsAsync has not been executed and is cleared if evaluateExpressionsAsync is executed more than once. After evaluation, the order of the PopupElement in the QList is the order that elements are in the PopupDefinition::elements and are shown in the pop-up window. If an ExpressionPopupElement is failed to be evaluated, it will be skipped in the QList. The error can be found in the list of PopupExpressionEvaluation returned from evaluateExpressionsAsync.
This function was introduced in Esri::ArcGISRuntime 100.14.
See also PopupDefinition::elements and evaluateExpressionsAsync.
[signal]
void PopupManager::featureTypeChanged()
Signal emitted when isFeatureType changes.
QList<Esri::ArcGISRuntime::FeatureType> PopupManager::featureTypes() constReturns a list of FeatureTypes or an empty list if the GeoElement is not an ArcGISFeature in an ArcGISFeatureTable.
Esri::ArcGISRuntime::PopupField *PopupManager::fieldByName(const QString &fieldName) constReturns the PopupField for a given field name.
This will return nullptr
if there is no such field or if the GeoElement is not an ArcGISFeature with fields.
[since Esri::ArcGISRuntime 100.3]
QString PopupManager::fieldLabel(Esri::ArcGISRuntime::PopupField *popupField) const
Returns a user-friendly display name for a given popup field.
If the field is based on a PopupExpression, the title of the expression will be returned.
This function was introduced in Esri::ArcGISRuntime 100.3.
Esri::ArcGISRuntime::FieldType PopupManager::fieldType(Esri::ArcGISRuntime::PopupField *popupField) constReturns the field type for a given PopupField.
Returns the attribute value for a given Field.
If the field is part of a CodedValueDomain, the CodedValue::code is returned (unlike formattedValue(Esri::ArcGISRuntime::PopupField*), which returns the CodedValue::name).
[since Esri::ArcGISRuntime 100.14]
QVariant PopupManager::fieldValue(const QString &fieldName, Esri::ArcGISRuntime::PopupElement *popupElement) const
Returns the attribute value for the field specified by a name.
If any field is using expressions, use evaluateExpressionsAsync to evaluate the Arcade expressions before trying to get the fields' values. Otherwise, the values may not be evaluated properly.
If any field is using expressions, use evaluateExpressions to evaluate the Arcade expressions before trying to get the fields' values. Otherwise, the values may not be evaluated properly.
If the field is part of a CodedValueDomain, the CodedValue::code is returned (unlike formattedValue(Esri::ArcGISRuntime::PopupField*), which returns the CodedValue::name).
This function was introduced in Esri::ArcGISRuntime 100.14.
[invokable]
void PopupManager::finishEditing()
Finishes the editing session.
This runs asynchronously, and editingCompleted signal emit once the editing session has ended.
Note: The PopupManager does not automatically call applyEdits on the associated GeoElement's ArcGISFeatureTable. To commit any edits to the source data, call applyEdits on the associated ArcGISFeatureTable.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
QString PopupManager::formattedValue(Esri::ArcGISRuntime::PopupField *popupField) constReturns a formatted String representation of the current popup field's value.
If PopupDefinition::expressions is not empty, the PopupField may be using expressions with Arcade FeatureSet functions. Use PopupManager::evaluateExpressionsAsync() to evaluate the Arcade expressions before trying to get the formatted string representation of the popup field's value, otherwise it may return an empty string.
If the field is part of a CodedValueDomain, the CodedValue::name is returned.
[signal, since Esri::ArcGISRuntime 100.14]
void PopupManager::geoElementContingencyValidationErrorsChanged(const QMap<QString, Esri::ArcGISRuntime::Error> &errors)
Signal emitted when the geoelement contingency validation errors change.
This function was introduced in Esri::ArcGISRuntime 100.14.
[signal, since Esri::ArcGISRuntime 100.14]
void PopupManager::geoElementContingencyValidationWarningsChanged(const QMap<QString, Esri::ArcGISRuntime::Error> &warnings)
Signal emitted when the geoelement contingency validation warnings change.
This function was introduced in Esri::ArcGISRuntime 100.14.
[signal]
void PopupManager::geoElementValidChanged()
Signal emitted when isGeoElementValid changes.
[signal, since Esri::ArcGISRuntime 100.14]
void PopupManager::geoElementWarningsChanged(const QMap<QString, Esri::ArcGISRuntime::Error> &warnings)
Signal emitted when the geoelement validation warnings change.
This function was introduced in Esri::ArcGISRuntime 100.14.
bool PopupManager::isDeleteAllowed() constReturns a bool that determines whether deleting the GeoElement is allowed.
Note: Getter function for property deleteAllowed.
bool PopupManager::isEditGeometryAllowed() constReturns a bool that determines whether geometry editing is allowed.
Note: Getter function for property editGeometryAllowed.
bool PopupManager::isEditing() constReturns a bool that determines whether or not currently in editing mode.
Note: Getter function for property editing.
bool PopupManager::isEditingAllowed() constReturns a bool that determines whether attribute editing is allowed.
Note: Getter function for property editingAllowed.
bool PopupManager::isFeatureType(Esri::ArcGISRuntime::PopupField *popupField) constReturns a bool that determines whether whether the specified popupField is a FeatureType field.
[since Esri::ArcGISRuntime 100.14]
bool PopupManager::isFieldInFieldGroup(Esri::ArcGISRuntime::PopupField *popupField) const
Returns a bool that determines if the given PopupField is part of a FieldGroup as defined in a ContingentValuesDefinition.
This function was introduced in Esri::ArcGISRuntime 100.14.
bool PopupManager::isGeoElementValid() constReturns a bool that determines whether or not the GeoElement is in a valid state as far as the values it has set in its attributes and its geometry.
Note: Getter function for property geoElementValid.
bool PopupManager::isNullable(Esri::ArcGISRuntime::PopupField *popupField) constReturns a bool that determines whether whether or not a given PopupField allows empty values.
Returns a bool that determines whether or not the pop-up UI should show the attachments.
Takes into account the PopupDefinition::isShowAttachments and if the layer has attachments.
Note: Getter function for property showAttachments.
bool PopupManager::isShowCustomHtmlDescription() constReturns a bool that determines whether or not the pop-up UI should show the custom description HTML.
Note: Getter function for property showCustomHtmlDescription.
bool PopupManager::isShowEditSummary() constReturns a bool that determines whether or not the pop-up UI should show the edit info summary.
Note: Getter function for property showEditSummary.
bool PopupManager::isShowMedia() constReturns a bool that determines whether or not the pop-up UI should show the media.
Note: Getter function for property showMedia.
int PopupManager::maxLength(Esri::ArcGISRuntime::PopupField *popupField) constReturns the maximum allowed length of the specified PopupField.
Returns the associated Popup object.
If the geo-element associated with the popup implements Loadable it must be loaded for the PopupManager to work properly.
QString PopupManager::rangeDomainValidationText(Esri::ArcGISRuntime::PopupField *popupField) constReturns a string that you can display in the UI for informing the user of the valid range for numeric input.
Sets the GeometryBuilder used to edit the GeoElement's geometry.
See also editingGeometryBuilder().
[invokable]
bool PopupManager::startEditing()
Initiates an editing session with the Popup.
Returns true
if editing was started successfully and false
if editing is already started or not allowed.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[invokable]
QString PopupManager::substitute(const QString &templateString) const
Substitutes attribute values for attribute place-holders in a given template string.
If PopupDefinition::expressions is not empty, the input string may be using expressions with Arcade FeatureSet functions. Use PopupManager::evaluateExpressionsAsync() to evaluate the Arcade expressions before trying to get the substitute string, otherwise it may return an empty string.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
Esri::ArcGISRuntime::Symbol *PopupManager::symbol() constReturns the symbol used by the popup's geo-element.
QString PopupManager::title() constReturns the text to display as the popup title.
Note: Getter function for property title.
Esri::ArcGISRuntime::Error PopupManager::updateValue(const Esri::ArcGISRuntime::FeatureTemplate &featureTemplate, Esri::ArcGISRuntime::FeatureTypeChangeMode changeMode)Updates the feature type of the geo-element associated with the popup to match those in the feature template, dependent on the change mode.
If changeMode is ResetToDefaults, then all current values will be reset to the defaults specified in the FeatureTemplate. If KeepValues, current values will be kept unless they are not valid for the new feature type (for example, if a CodedValueDomain changes and the current value is not in the new domain).
Esri::ArcGISRuntime::Error PopupManager::updateValue(const QVariant &newValue, Esri::ArcGISRuntime::PopupField *popupField)Updates the value of a field in the geo-element associated with the popup.
This function expects you to pass at least the correct type of value for the field. The only exception to that is that you can pass a string for numeric fields and this function will do the work of converting it to the appropriate number type for the specified field. Returns an empty Error if the new value passes validation.
Esri::ArcGISRuntime::Error PopupManager::validationError(Esri::ArcGISRuntime::PopupField *popupField) constReturns the validation warning, if any, currently associated with a given PopupField.
When warning conditions occur, PopupManager still allows to update field values and finish edits. And no Error will be returned from validationError(Esri::ArcGISRuntime::PopupField*), updateValue(const QVariant&, Esri::ArcGISRuntime::PopupField*) and finishEditing.
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