A frame that, when added to an ImageOverlay, renders an image on top of a scene. More...
Header: | #include <ImageFrame.h> |
Since: | Esri::ArcGISRuntime 100.8 |
Inherits: | Esri::ArcGISRuntime::Object, Esri::ArcGISRuntime::Loadable, and Esri::ArcGISRuntime::RemoteResource |
Public Functions
ImageFrame(const QUrl &url, QObject *parent = nullptr) | |
ImageFrame(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr) | |
ImageFrame(const QUrl &url, const Esri::ArcGISRuntime::Envelope &extent, QObject *parent = nullptr) | |
ImageFrame(const QUrl &url, const Esri::ArcGISRuntime::Envelope &extent, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr) | |
ImageFrame(const QUrl &url, const Esri::ArcGISRuntime::Polygon &quadrilateral, QObject *parent = nullptr) | |
ImageFrame(const QUrl &url, const Esri::ArcGISRuntime::Polygon &quadrilateral, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr) | |
ImageFrame(const QImage &image, const Esri::ArcGISRuntime::Envelope &extent, QObject *parent = nullptr) | |
ImageFrame(const QImage &image, const Esri::ArcGISRuntime::Polygon &quadrilateral, QObject *parent = nullptr) | |
virtual | ~ImageFrame() override |
Esri::ArcGISRuntime::Envelope | extent() const |
QImage | image() const |
Esri::ArcGISRuntime::Polygon | quadrilateral() const |
Reimplemented Public Functions
virtual void | cancelLoad() override |
virtual Esri::ArcGISRuntime::Credential * | credential() const override |
virtual void | load() override |
virtual Esri::ArcGISRuntime::Error | loadError() const override |
virtual Esri::ArcGISRuntime::LoadStatus | loadStatus() const override |
virtual Esri::ArcGISRuntime::RequestConfiguration | requestConfiguration() const override |
virtual void | retryLoad() override |
virtual void | setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override |
virtual QUrl | url() const override |
Signals
void | doneLoading(const Esri::ArcGISRuntime::Error &loadError) |
void | loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus) |
Detailed Description
An ImageFrame can contain images that do not have georeferencing information. In such cases, location data can be provided to geolocate the image.
Relevant samples:
- Animate images with image overlay: Animate a series of images with an image overlay.
See also ImageOverlay.
Member Function Documentation
[explicit]
ImageFrame::ImageFrame (const QUrl &url, QObject *parent = nullptr)
Creates an ImageFrame containing the image defined by the provided URL.
- url - A URL that identifies a local or online image source.
- parent - The optional parent QObject.
Supported image formats are GeoTIFF, TIFF, JPEG, and PNG. The URL can be a local file path or an HTTP path to an image.
ImageFrame::ImageFrame (const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
Creates an image frame containing the image defined by the url, a credential, and an optional parent.
This url could be a local file path, Qt resource path, or HTTP path to the image.
A credential is specified if the image needs authentication to gain access to it.
Supported image formats are GEOTIFF
, TIFF
, JPEG
, and PNG
.
ImageFrame::ImageFrame (const QUrl &url, const Esri::ArcGISRuntime::Envelope &extent, QObject *parent = nullptr)
Creates an ImageFrame containing the image identified by the URL for display at the specified geographic extent.
- url - A URL that identifies a local or online image source.
- extent - The geographic extent at which the image is displayed.
- parent - The optional parent QObject.
If a spatial reference is not defined for the extent, it is assumed to be the same as the scene. If the spatial reference of the extent is different from that of the scene, then the image would fail to render. Supported image formats are GeoTIFF, TIFF, JPEG, and PNG. The URL can be a local file path or an HTTP path to an image.
ImageFrame::ImageFrame (const QUrl &url, const Esri::ArcGISRuntime::Envelope &extent, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
Creates an ImageFrame containing the image identified by the url secured by a credential, for display at the specified geographic extent and an optional parent.
This url could be a local file path, Qt resource path, or HTTP path to the image.
If a spatial reference is not defined for the extent, it is assumed to be the same as the scene. Otherwise, the extent will be projected to match the scene.
A credential is specified if the image needs authentication to gain access to it.
Supported image formats are GEOTIFF
, TIFF
, JPEG
, and PNG
.
ImageFrame::ImageFrame (const QUrl &url, const Esri::ArcGISRuntime::Polygon &quadrilateral, QObject *parent = nullptr)
Creates an ImageFrame using the URL of an image and a four-point polygon representing the corners of an image.
- url - A URL that identifies a local or online image source.
- quadrilateral - A polygon consisting of four points that represent each corner of the image.
- parent - The optional parent QObject.
If a spatial reference is not defined for the polygon, it is assumed to be the same as the scene. If the spatial reference of the extent is different from that of the scene, then the image would fail to render. If the provided polygon doesn't contain exactly four points, the image frame will fail to load. Supported image formats are GeoTIFF, TIFF, JPEG, and PNG. The URL can be a local file path or an HTTP path to an image.
ImageFrame::ImageFrame (const QUrl &url, const Esri::ArcGISRuntime::Polygon &quadrilateral, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
Creates an ImageFrame containing the image identified by the url secured by a credential for display, quadrilateral, and an optional parent.
This url could be a local file path, Qt resource path, or HTTP path to the image.
The quadrilateral in this case is a four-point polygon and the image frame will fail to load if the number of points is more or less. If a spatial reference is not defined for the polygon, it is assumed to be the same as the scene. Otherwise, the extent will be projected to match the scene.
A credential is specified if the image needs authentication to gain access to it.
Supported image formats are GEOTIFF
, TIFF
, JPEG
, and PNG
.
ImageFrame::ImageFrame (const QImage &image, const Esri::ArcGISRuntime::Envelope &extent, QObject *parent = nullptr)
Creates an ImageFrame containing the image for display at the specified geographic extent.
- image - An image to display in the frame.
- extent - The geographic extent at which the image is displayed.
- parent - The optional parent QObject.
If a spatial reference is not defined for the extent, it is assumed to be the same as the scene. If the spatial reference of the extent is different from that of the scene, then the image would fail to render. Supported image formats are TIFF, GeoTIFF, ICO, BMP, GIF, JPEG, and PNG. Animated GIF is not supported.
ImageFrame::ImageFrame (const QImage &image, const Esri::ArcGISRuntime::Polygon &quadrilateral, QObject *parent = nullptr)
Creates an ImageFrame using the image and a four-point polygon representing the corners of an image.
- image - An image to display in the frame.
- quadrilateral - A polygon consisting of four points that represent each corner of the image.
- parent - The optional parent QObject.
If a spatial reference is not defined for the polygon, it is assumed to be the same as the scene. If the spatial reference of the extent is different from that of the scene, then the image would fail to render. If the provided polygon doesn't contain exactly four points, the image frame will fail to load. Supported image formats are TIFF, GeoTIFF, ICO, BMP, GIF, JPEG, and PNG. Animated GIF is not supported.
[override virtual]
ImageFrame::~ImageFrame ()
Destructor.
[override virtual]
void ImageFrame::cancelLoad ()
Reimplements: Loadable::cancelLoad().
Cancels loading metadata for the object.
Cancels loading the metadata if the object is loading.
See Loadable.
[override virtual]
Esri::ArcGISRuntime::Credential *ImageFrame::credential() const
Reimplements: RemoteResource::credential() const.
Returns the security credentials to access the remote resource. Only applicable if the resource is secured.
[signal]
void ImageFrame::doneLoading (const Esri::ArcGISRuntime::Error &loadError )
Signal emitted when this object is done loading.
- loadError - Details about any error that may have occurred.
Note: If there is a load error it will also be emitted on the errorOccurred
signal.
Esri::ArcGISRuntime::Envelope ImageFrame::extent() const
Returns the extent of the image.
QImage ImageFrame::image() const
Returns the image contained in the ImageFrame.
[override virtual]
void ImageFrame::load()
Reimplements: Loadable::load().
Loads the metadata for the object asynchronously.
Loads the metadata if the object is not loaded.
See Loadable.
[override virtual]
Esri::ArcGISRuntime::Error ImageFrame::loadError () const
Reimplements: Loadable::loadError() const.
Returns the load error.
See Loadable.
See also Error.
[override virtual]
Esri::ArcGISRuntime::LoadStatus ImageFrame::loadStatus () const
Reimplements: Loadable::loadStatus() const.
Returns the load status.
See Loadable.
See also LoadStatus.
[signal]
void ImageFrame::loadStatusChanged (Esri::ArcGISRuntime::LoadStatus loadStatus )
Signal emitted when the load status changes for this object.
- loadStatus - The LoadStatus.
See also Loadable.
Esri::ArcGISRuntime::Polygon ImageFrame::quadrilateral() const
Returns a polygon consisting of four points that represent each corner of the image.
[override virtual]
Esri::ArcGISRuntime::RequestConfiguration ImageFrame::requestConfiguration () const
Reimplements: RemoteResource::requestConfiguration() const.
Returns the RequestConfiguration in use by the ImageFrame.
See also setRequestConfiguration().
[override virtual]
void ImageFrame::retryLoad ()
Reimplements: Loadable::retryLoad().
Loads or retries loading metadata for the object asynchronously.
Will retry loading the metadata if the object is failed to load. Will load the object if it is not loaded. Will not retry to load the object if the object is loaded. Will always call the done loading if this is called.
See Loadable.
[override virtual]
void ImageFrame::setRequestConfiguration (const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration )
Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).
Sets configuration parameters used for network requests sent by the ImageFrame to requestConfiguration.
See also requestConfiguration().
[override virtual]
QUrl ImageFrame::url() const
Reimplements: RemoteResource::url() const.
Returns the URL path to the image.
This could be a local file path, Qt resource path, or HTTP path to the image.