Item Class

  • Item
  • class Esri::ArcGISRuntime::Item

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

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

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

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    virtual ~Item() override
    QString accessInformation() const
    QDateTime created() const
    QString description() const
    Esri::ArcGISRuntime::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 Esri::ArcGISRuntime::Envelope &extent)
    void setItemId(const QString &itemId)
    void setSnippet(const QString &snippet)
    void setSpatialReference(const Esri::ArcGISRuntime::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
    Esri::ArcGISRuntime::SpatialReference spatialReference() const
    QStringList tags() const
    QString termsOfUse() const
    QImage thumbnail() const
    QString title() const
    QStringList typeKeywords() const
    void updateItemProperties()

    Signals

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

    Detailed Description

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

    See also Layer::item, GeoModel::item, and Basemap::item.

    Member Function Documentation

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

    Emitted when fetching of data has completed for this item.

    • success - Whether the data was fetched successfully.

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

    Emitted when fetching the thumbnail has completed for this item.

    • success - Whether the thumbnail was fetched successfully.

    [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.

    [override virtual] 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().

    Esri::ArcGISRuntime::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.

    void Item::fetchThumbnail()

    Starts an asynchronous operation to fetch the thumbnail image.

    See also Item::thumbnail.

    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 Esri::ArcGISRuntime::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.

    Item ID can only be set on an item that hasn't been loaded.

    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 Esri::ArcGISRuntime::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().

    Esri::ArcGISRuntime::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.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.