A form element that holds one or more attachments on a feature. More...
Header | #include <Attachments |
Since | Esri |
Inherits | Esri |
Public Functions
virtual | ~ |
Esri | add |
Q | attachments() const |
void | delete |
Q | fetch |
bool | is |
Q | keyword() const |
Signals
void | editable |
Detailed Description
The AttachmentsFormElement specifies how one or more attachments can participate in the form. When present in the form, the user has the ability to edit the list of attachments specific to the form element.
Member Function Documentation
[override virtual noexcept]
AttachmentsFormElement::~AttachmentsFormElement ()
Destructor.
Esri::ArcGISRuntime::FormAttachment *AttachmentsFormElement::addAttachment (const QString &name, const QString &contentType , const QByteArray &data)
Returns adds a new attachment to this AttachmentsFormElement.
- name - The attachment name.
- contentType - The type of content.
- data - The attachment data.
QList <Esri::ArcGISRuntime::FormAttachment *> AttachmentsFormElement::attachments() const
Returns all the current attachments. This is empty if attachments haven't yet been fetched.
See also fetchAttachmentsAsync.
void AttachmentsFormElement::deleteAttachment (Esri::ArcGISRuntime::FormAttachment *attachment)
Deletes an attachment from the Feature.
- attachment - The FormAttachment to delete.
[signal]
void AttachmentsFormElement::editableChanged (bool isEditable )
Signal emitted when the editable state changes.
- isEditable - The new isEditable of the element.
QFuture <void> AttachmentsFormElement::fetchAttachmentsAsync ()
Fetches the attachments from the Feature and populates attachments. Attachments are not re-fetched if they have already been fetched.
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 AttachmentsFormElement::isEditable () const
Returns true
if the element is editable, false
otherwise.
This property can be modified by the editable expression, which can be set during Feature Form authoring.
QString AttachmentsFormElement::keyword() const
Returns a string to identify the attachment(s).
When a file is attached using the form, this property sets the value of the keywords field for the attachment. When a form displays existing attachments, this property is used to query attachments with an exact match on the keywords field.