Represents an attachment belonging to a feature form. Wraps the Attachment object and adds additional properties and methods to support displaying attachments in a FeatureForm. More...
| Header | #include <Form | 
| Since | Esri | 
| Inherits | Esri | 
Public Functions
| virtual | ~ | 
| Esri | attachment() const | 
| QString | content | 
| QFuture | create | 
| QFuture | create | 
| QString | file | 
| bool | is | 
| QString | name() const | 
| void | set | 
| qint64 | size() const | 
| Esri | type() const | 
Reimplemented Public Functions
| virtual void | cancel | 
| virtual void | load() override | 
| virtual Esri | load | 
| virtual Esri | load | 
| virtual void | retry | 
Signals
| void | done | 
| void | load | 
Detailed Description
Member Function Documentation
[override virtual noexcept] FormAttachment::~FormAttachment  ()  
Destructor.
Esri::ArcGISRuntime::Attachment    *FormAttachment::attachment() const   
Returns the underlying Attachment.
[override virtual] void FormAttachment::cancelLoad ()  
Reimplements: Loadable::cancelLoad().
Cancels loading metadata for the object.
Cancels loading the metadata if the object is loading and always calls doneLoading.
QString FormAttachment::contentType () const  
Returns the MIME content type of the FormAttachment.
QFuture<QImage> FormAttachment::createFullImageAsync   ()  
Creates the full image for displaying the attachment in full screen or larger than a thumbnail.
This is only applicable if the attachment type is FormAttachmentType::Image.
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.
QFuture<QImage> FormAttachment::createThumbnailAsync  (int width, int height)  
Creates a thumbnail image with the specified width and height.
- width - Width of the thumbnail.
- height - Height of the thumbnail.
This is only applicable if the attachment type is FormAttachmentType::Image.
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.
[signal] void FormAttachment::doneLoading (const Esri::ArcGISRuntime::Error    &loadError )  
Signal emitted when this object is done loading.
- loadError - Details about any error that may have occurred.
Note: If there is a load error it will also be emitted on the errorOccurred signal.
QString FormAttachment::filePath () const  
Returns the local temporary file path that stores the attachment once it is loaded.
bool FormAttachment::isLocal () const  
Returns whether "loading" (fetching the data) can be accomplished without using the network.
This is true if data needs to be pulled from a database and false if loading causes a network request.
[override virtual] void FormAttachment::load()  
Reimplements: Loadable::load().
Loads the metadata for the object asynchronously.
Loads the metadata if the object is not loaded and always calls doneLoading.
[override virtual] Esri::ArcGISRuntime::Error    FormAttachment::loadError () const  
Reimplements: Loadable::loadError() const.
Returns the load error.
See also Error.
[override virtual] Esri::ArcGISRuntime::LoadStatus     FormAttachment::loadStatus () const  
Reimplements: Loadable::loadStatus() const.
Returns the load status.
See also LoadStatus.
[signal] void FormAttachment::loadStatusChanged  (Esri::ArcGISRuntime::LoadStatus     loadStatus )  
Signal emitted when the load status changes for this object.
- loadStatus - The LoadStatus.
See also Loadable.
QString FormAttachment::name() const  
Returns the name of the FormAttachment.
See also setName().
[override virtual] void FormAttachment::retryLoad ()  
Reimplements: Loadable::retryLoad().
Loads or retries loading metadata for the object asynchronously.
Will retry loading the metadata if the object is failed to load. Will load the object if it is not loaded. Will not retry to load the object if the object is loaded. Will always call the done loading if this is called.
void FormAttachment::setName (const QString &name)  
Sets the name to name.
See also name.
qint64 FormAttachment::size() const  
Returns the size of the FormAttachment in bytes.
Esri::ArcGISRuntime::FormAttachmentType      FormAttachment::type() const  
Returns the type of the FormAttachment.