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 information on the source of the item and its copyright status.

    See also setAccessInformation().

    QDateTime Item::created() const

    Returns the date the item was created.

    QString Item::description() const

    Returns the description of the specified item.

    See also setDescription().

    Esri::ArcGISRuntime::Envelope Item::extent() const

    Returns the extent of the specified 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.

    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.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    QString Item::itemId() const

    Returns the item ID of the specified item.

    Item ID can only be set on not loaded item.

    See also setItemId().

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

    Returns the item's type.

    QDateTime Item::modified() const

    Returns the date the item was last modified.

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

    See also accessInformation.

    void Item::setDescription(const QString &description)

    Sets the description to description.

    See also description.

    void Item::setExtent(const Esri::ArcGISRuntime::Envelope &extent)

    Sets the extent to extent.

    See also extent.

    void Item::setItemId(const QString &itemId)

    Sets the itemId to itemId.

    See also itemId.

    void Item::setSnippet(const QString &snippet)

    Sets the snippet 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 tags 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 to title.

    See also title.

    [since Esri::ArcGISRuntime 100.5] void Item::setTypeKeywords(const QStringList &typeKeywords)

    Sets the typeKeywords to typeKeywords.

    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 specified item.

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

    [since Esri::ArcGISRuntime 100.5] QStringList Item::typeKeywords() const

    Returns an array of keywords that further describes the type of this item. Each item is tagged with a set of type keywords that are derived based on its primary type.

    The type keywords of the specified 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()

    Updates an item's properties in a file on disk when this item instance is a LocalItem.

    This method resides in the Item base class to match the public API, but within the C API it's implemented only on LocalItem and PortalItem simply throws an exception. The client APIs provide their own implementations of this method for PortalItems.

    The following remarks apply when the item instance is a LocalItem.

    Updating properties can be only done for local items that are unpacked. For example a mobile map package file (.mmpk) can be unpacked using MobileMapPackage::unpackAsync(const QString&, const QString&). Once unpacked local items within the package can be updated see MobileMapPackage::item and for any maps use GeoModel::item. As well as packages, the local item available from an item resource cache can be updated. This is accessed with ItemResourceCache::item. If the package is not unpacked an error of ErrorType::CommonInvalidCall is returned as an error in the async task.

    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.

    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.