Skip To Content ArcGIS for Developers Sign In Dashboard

Item Class

(Esri::ArcGISRuntime::Item)

A base class for items in data stores like Portal or a map package. More...

Header: #include <Item>
Since: Esri::ArcGISRuntime 100.0
Inherits: Object
Inherited By:

Esri::ArcGISRuntime::LocalItem and Esri::ArcGISRuntime::PortalItem

Public Functions

~Item()
QString accessInformation() const
QDateTime created() const
QString description() const
Envelope extent() const
void fetchData(const QString &filePath)
void fetchThumbnail()
QString itemId() const
Esri::ArcGISRuntime::ItemType itemType() const
QDateTime modified() const
QString name() const
void setAccessInformation(const QString &accessInformation)
void setDescription(const QString &description)
void setExtent(const Envelope &extent)
void setItemId(const QString &itemId)
void setSnippet(const QString &snippet)
void setSpatialReference(const SpatialReference &spatialReference)
void setTags(const QStringList &tags)
void setTermsOfUse(const QString &termsOfUse)
void setThumbnail(const QImage &image)
void setTitle(const QString &title)
void setTypeKeywords(const QStringList &typeKeywords)
QString snippet() const
SpatialReference spatialReference() const
QStringList tags() const
QString termsOfUse() const
QImage thumbnail() const
QString title() const
QStringList typeKeywords() const
void updateItemProperties()
  • 31 public functions inherited from QObject

Signals

void fetchDataCompleted(bool success)
void fetchThumbnailCompleted(bool success)
void updateItemPropertiesCompleted(bool success, const QString &itemId)

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

A base class for items in data stores like Portal or a map package.

This base class defines information common to all types of items.

Member Function Documentation

Item::~Item()

Destructor.

QString Item::accessInformation() const

Returns the access information on the source of the item.

See also setAccessInformation().

QDateTime Item::created() const

Returns the creation time of this item.

QString Item::description() const

Returns the item description.

See also setDescription().

Envelope Item::extent() const

Returns the bounding rectangle of the item.

See also setExtent().

void Item::fetchData(const QString &filePath)

Fetches the data for this item and saves to the specified filePath.

See also Item::fetchDataCompleted.

[signal] void Item::fetchDataCompleted(bool success)

Emitted when fetching of data has completed for this item.

  • success - Whether the data was fetched successfully.

void Item::fetchThumbnail()

Starts an asynchronous operation to fetch the thumbnail image.

See also Item::thumbnail.

[signal] void Item::fetchThumbnailCompleted(bool success)

Emitted when fetching the thumbnail has completed for this item.

  • success - Whether the thumbnail was fetched successfully.

QString Item::itemId() const

Returns the item's ID.

See also setItemId().

Esri::ArcGISRuntime::ItemType Item::itemType() const

Returns the item's type.

QDateTime Item::modified() const

Returns the last-modified time of this item.

QString Item::name() const

Returns the name of this item.

Note: Prior to Esri.ArcGISRuntime 100.5, this method was only available on PortalItem.

This function was introduced in Esri::ArcGISRuntime 100.5.

void Item::setAccessInformation(const QString &accessInformation)

Sets the access information on the source of the item to accessInformation.

See also accessInformation().

void Item::setDescription(const QString &description)

Sets the item description to description.

See also description().

void Item::setExtent(const Envelope &extent)

Sets the bounding rectangle of the item to extent.

See also extent().

void Item::setItemId(const QString &itemId)

Sets the item's ID to itemId.

See also itemId().

void Item::setSnippet(const QString &snippet)

Sets the short summary description of the item to snippet.

See also snippet().

void Item::setSpatialReference(const SpatialReference &spatialReference)

Sets the spatial reference of this item to spatialReference.

See also spatialReference().

void Item::setTags(const QStringList &tags)

Sets the user-defined tags that describe this item to tags.

See also tags().

void Item::setTermsOfUse(const QString &termsOfUse)

Sets the terms of use for the item to termsOfUse.

This function was introduced in Esri::ArcGISRuntime 100.4.

See also termsOfUse().

void Item::setThumbnail(const QImage &image)

Sets the thumbnail as an image to be used for the item.

See also thumbnail().

void Item::setTitle(const QString &title)

Sets the title of the item to title.

This is the name that's displayed to users and by which they refer to the item. Every item must have a title.

See also title().

void Item::setTypeKeywords(const QStringList &typeKeywords)

Sets a set of keywords that further describes the type of this item to typeKeywords.

Each item is tagged with a set of type keywords that are derived based on its primary type.

Note: Prior to Esri.ArcGISRuntime 100.5, this method was only available on PortalItem.

This function was introduced in Esri::ArcGISRuntime 100.5.

See also typeKeywords().

QString Item::snippet() const

Returns the short summary description of the item.

See also setSnippet().

SpatialReference Item::spatialReference() const

Returns the spatial reference of this item.

See also setSpatialReference().

QStringList Item::tags() const

Returns the user-defined tags that describe this item.

See also setTags().

QString Item::termsOfUse() const

Returns any terms of use on the item, typically in HTML.

It is stored in the "licenseInfo" property in an item's JSON. The access and use constraints can contain HTML markup.

This function was introduced in Esri::ArcGISRuntime 100.4.

See also setTermsOfUse().

QImage Item::thumbnail() const

Returns the thumbnail image of the item.

If the item has not been given an image with setThumbnail, then call fetchThumbnail to fetch the thumbnail image for the item and wait for the fetchThumbnailCompleted signal to emit.

See also setThumbnail().

QString Item::title() const

Returns the title of the item.

See also setTitle().

QStringList Item::typeKeywords() const

Returns a set of keywords that further describes the type of this item.

Note: Prior to Esri.ArcGISRuntime 100.5, this method was only available on PortalItem.

This function was introduced in Esri::ArcGISRuntime 100.5.

See also setTypeKeywords.

void Item::updateItemProperties()

Starts an asynchronous task to update an item's properties.

The updateItemPropertiesCompleted signal includes whether the operation was successful.

PortalItem

If the item is a portal item, this method starts an asynchronous task to update properties of the remote PortalItem.

Note: Prior to Esri::ArcGISRuntime 100.4, this method was only available on PortalItem.

LocalItem

If the item is a local item, this method starts an asynchronous task to update the item's properties the local file system where applicable.

Updating properties can be done only for local items that are unpacked. For example, a mobile map package file (.mmpk) can be unpacked using MobileMapPackage::unpack. Once unpacked, local items within the package can be updated - see MobileMapPackage::item and for maps use Map::item.

As well as packages, the local item available from an item resource cache can be updated. This is accessed ItemResourceCache::item.

If the package is not unpacked, the task will return an error.

This function was introduced in Esri::ArcGISRuntime 100.4.

See also PortalItem and LocalItem.

[signal] void Item::updateItemPropertiesCompleted(bool success, const QString &itemId)

Signal emitted when the asynchronous updateItemProperties method completes.

success - Whether the update was successful. itemId - The ID of the Item that was updated.

This function was introduced in Esri::ArcGISRuntime 100.4.


Feedback on this topic?