A list model storing a list of PopupAttachment available for an ArcGISFeature. More...
|  Header |  #include <Popup | 
|  Since |  Esri | 
|  Inherits |  QAbstract | 
This class was introduced in Esri::ArcGISRuntime 100.1.
Public Types
| enum | Popup | 
Properties
- count : const int
 - thumbnailHeight : const int
 - thumbnailWidth : const int
 
Public Functions
| virtual | ~ | 
| bool | apply | 
| bool | auto | 
| bool | auto | 
| bool | auto | 
| void | set | 
| void | set | 
| void | set | 
| void | set | 
| void | set | 
| void | set | 
| void | set | 
|  Esri | thumbnail | 
| int | thumbnail | 
| int | thumbnail | 
Reimplemented Public Functions
|  virtual Esri | at(int index) const override | 
| virtual QVariant | data(const QModel | 
| virtual int | size() const override | 
Signals
| void | count | 
| void | thumbnail | 
| void | thumbnail | 
Detailed Description
Obtain a PopupAttachmentListModel from a PopupAttachmentManager.
The model will automatically fetch attachments from the underlying features so that they can be displayed in a view.
This class is a subclass of QAbstractListModel.
The model returns data for the following roles:
| Role | Type | Description | PopupAttachmentRoles | 
|---|---|---|---|
| name | QString | The name of the attachment. | Popup | 
| content | QString | The MIM | Popup | 
| size | int | The size of the attachment in bytes. | Popup | 
| local | bool | Whether the data for the attachments has been downloaded locally. | Popup | 
| attachment | QUrl | The UR | Popup | 
| popup | Esri | The type of popup attachment. | Popup | 
| edit | Esri | The popup attachment edit state. | Popup | 
| thumbnail | QUrl | The UR | Popup | 
| full | QUrl | The UR | Popup | 
Member Type Documentation
enum PopupAttachmentListModel::PopupAttachmentRoles      
This enum specifies the custom roles which can be used with PopupAttachmentListModel::data.
| Constant | Value | Description | 
|---|---|---|
Esri | Qt | The name of the attachment. | 
Esri | Qt | The MIM | 
Esri | Qt | The size of the attachment in bytes. | 
Esri | Qt | Whether the data for the attachments has been downloaded locally. | 
Esri | Qt | The UR | 
Esri | Qt | The type of popup attachment. | 
Esri | Qt | The popup attachment edit state. | 
Esri | Qt | The UR | 
Esri | Qt | The UR | 
Property Documentation
count : const int
This property holds the number of attachments in the list model (read-only).
Notifier signal:
| void | count | 
thumbnailHeight  : const int
This property holds the attachment's thumbnail height (read-only).
Access functions:
| int | thumbnail | 
Notifier signal:
| void | thumbnail | 
thumbnailWidth  : const int
This property holds the attachment's thumbnail width (read-only).
Access functions:
| int | thumbnail | 
Notifier signal:
| void | thumbnail | 
Member Function Documentation
[signal] void PopupAttachmentListModel::countChanged ()    
Signal emitted when the model row count changes.
Note: Notifier signal for property count.
This function was introduced in Esri::ArcGISRuntime 100.4.
[signal] void PopupAttachmentListModel::thumbnailHeightChanged  ()    
Signal emitted when the thumbnail height changes.
Note: Notifier signal for property thumbnailHeight.
This function was introduced in Esri::ArcGISRuntime 100.1.
[signal] void PopupAttachmentListModel::thumbnailWidthChanged  ()    
Signal emitted when the thumbnail width changes.
Note: Notifier signal for property thumbnailWidth.
This function was introduced in Esri::ArcGISRuntime 100.1.
[override virtual] PopupAttachmentListModel::~PopupAttachmentListModel    ()    
Destructor.
bool PopupAttachmentListModel::applyFilter () const    
Returns whether the model is displaying PopupAttachmentManager::attachments (false) or PopupAttachmentManager::filterAttachments (true).
Note: The default value is false.
See also setApplyFilter(), PopupAttachmentManager::filterAttachments, and PopupAttachmentManager::attachments.
[override virtual] Esri::ArcGISRuntime::PopupAttachment     *PopupAttachmentListModel::at(int index) const     
Returns the popup attachment at the specified index.
bool PopupAttachmentListModel::autoFetchFullImages   () const    
Returns whether the model should automatically request full images for attachments as they are accessed.
The popup attachment will be loaded when full images are requested if it is not loaded.
Note: The default value is true.
See also setAutoFetchFullImages().
bool PopupAttachmentListModel::autoFetchThumbnails  () const    
Returns whether the model should automatically request thumbnail images for attachments as they are accessed.
The popup attachment will be loaded when thumbnails are requested if it is not loaded.
Note: The default value is true.
See also setAutoFetchThumbnails().
bool PopupAttachmentListModel::autoLoad () const    
Returns whether the model should attempt to load each popup attachment as they are accessed by the model.
Note: The default value is true.
See also setAutoLoad() and Loadable.
[override virtual] QVariant PopupAttachmentListModel::data(const QModelIndex  &index, int role = Qt::DisplayRole) const      
Reimplements: QAbstractItemModel::data(const QModelIndex &index, int role) const.
Returns the data stored under the given role for the popup referred to by the index.
- index. The index in the model for which to return data.
 - role. The role for which to return data.
 
void PopupAttachmentListModel::setApplyFilter  (bool applyFilter )    
Sets whether the model should display PopupAttachmentManager::attachments or PopupAttachmentManager::filterAttachments to applyFilter. This can be changed at any time.
Note: Setting this to true will return the filtered attachments. The default value is false.
See also applyFilter(), PopupAttachmentManager::filterAttachments, and PopupAttachmentManager::attachments.
void PopupAttachmentListModel::setAutoFetchFullImages    (bool autoFetchFullImages   )    
Sets whether the model should automatically request full images for attachments as they are accessed to autoFetchFullImages.
If this is true the model will request full images if it encounters an empty full image from the underlying popup attachment.
See also autoFetchFullImages().
void PopupAttachmentListModel::setAutoFetchThumbnails   (bool autoFetchThumbnails  )    
Sets whether the model should automatically request thumbnail images for attachments as they are accessed to autoFetchThumbnails.
If this is true the model will request thumbnail images if it encounters an empty thumbnail from the underlying popup attachment.
See also autoFetchThumbnails(), thumbnailWidth, thumbnailHeight, and thumbnailAspectRatioMode.
void PopupAttachmentListModel::setAutoLoad  (bool autoLoad )    
Sets whether the model should attempt to load each popup attachment as they are accessed by the model to autoLoad.
See also autoLoad() and Loadable.
void PopupAttachmentListModel::setThumbnailAspectRatioMode    (Esri::ArcGISRuntime::AspectRatioMode      thumbnailAspectRatioMode   )    
Sets the aspect ratio mode of each thumbnail requested by the model to thumbnailAspectRatioMode.
See also thumbnailAspectRatioMode() and autoFetchThumbnails.
void PopupAttachmentListModel::setThumbnailHeight  (int thumbnailHeight )    
Sets the height of each thumbnail requested by the model to thumbnailHeight.
See also thumbnailHeight() and autoFetchThumbnails.
void PopupAttachmentListModel::setThumbnailWidth  (int thumbnailWidth )    
Sets the width of each thumbnail requested by the model to thumbnailWidth.
See also thumbnailWidth() and autoFetchThumbnails.
[override virtual] int PopupAttachmentListModel::size() const    
Returns the number of popup attachments in the model.
Esri::ArcGISRuntime::AspectRatioMode      PopupAttachmentListModel::thumbnailAspectRatioMode   () const    
Returns the aspect ratio mode of each thumbnail requested by the model.
Note: The default value is Esri::ArcGISRuntime::AspectRatioMode::KeepAspectRatio.
See also setThumbnailAspectRatioMode() and autoFetchThumbnails.
int PopupAttachmentListModel::thumbnailHeight () const    
Returns the height of each thumbnail requested by the model.
Note: The default value is 64.
Note: Getter function for property thumbnailHeight.
See also setThumbnailHeight() and autoFetchThumbnails.
int PopupAttachmentListModel::thumbnailWidth () const    
Returns the width of each thumbnail requested by the model.
Note: The default value is 64.
Note: Getter function for property thumbnailWidth.
See also setThumbnailWidth() and autoFetchThumbnails.