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

    Public Functions

    virtual ~Item() override
    QString accessInformation() const
    QDateTime created() const
    QString description() const
    Esri::ArcGISRuntime::Envelope extent() const
    QFuture<void> fetchDataAsync(const QString &filePath)
    QFuture<QImage> fetchThumbnailAsync()
    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
    QFuture<QString> updateItemPropertiesAsync()

    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

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

    [since Esri::ArcGISRuntime 200.2] QFuture<void> Item::fetchDataAsync(const QString &filePath)

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

    Canceling the QFuture will not stop this operation from completing, though the QFuture will report that it is canceled and the completion handler will not be called.

    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.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 200.2] QFuture<QImage> Item::fetchThumbnailAsync()

    Starts an asynchronous operation to fetch the thumbnail image.

    Canceling the QFuture will not stop this operation from completing, though the QFuture will report that it is canceled and the completion handler will not be called.

    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.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    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.

    [since Esri::ArcGISRuntime 100.5] 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().

    [since Esri::ArcGISRuntime 100.4] 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().

    [since Esri::ArcGISRuntime 100.5] 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().

    [since Esri::ArcGISRuntime 100.4] 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().

    [since Esri::ArcGISRuntime 100.5] 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.

    [since Esri::ArcGISRuntime 200.2] QFuture<QString> Item::updateItemPropertiesAsync()

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

    PortalItem

    If the item is a portal item, this method starts an asynchronous task to update properties of the remote 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::unpackAsync. 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.

    Canceling the QFuture will not stop this operation from completing, though the QFuture will report that it is canceled and the completion handler will not be called.

    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.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    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.