Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickimageprovider.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
6
9#include <QtQuick/private/qsgcontext_p.h>
10#include <private/qqmlglobal_p.h>
11#include <QtGui/qcolorspace.h>
12
14
15/*!
16 \class QQuickTextureFactory
17 \since 5.0
18 \brief The QQuickTextureFactory class provides an interface for loading custom textures from QML.
19 \inmodule QtQuick
20
21 The purpose of the texture factory is to provide a placeholder for a image
22 data that can be converted into an OpenGL texture.
23
24 Creating a texture directly is not possible as there is rarely an OpenGL context
25 available in the thread that is responsible for loading the image data.
26*/
27
28/*!
29 Constructs a texture factory. Since QQuickTextureFactory is abstract, it
30 cannot be instantiated directly.
31*/
32
33QQuickTextureFactory::QQuickTextureFactory()
34{
35}
36
37/*!
38 Destroys the texture factory.
39*/
40
41QQuickTextureFactory::~QQuickTextureFactory()
42{
43}
44
45/*!
46 \fn int QQuickTextureFactory::textureByteCount() const
47
48 Returns the number of bytes of memory the texture consumes.
49*/
50
51/*!
52 \fn QImage QQuickTextureFactory::image() const
53
54 Returns an image version of this texture.
55
56 The lifespan of the returned image is unknown, so the implementation should
57 return a self contained QImage, not make use of the QImage(uchar *, ...)
58 constructor.
59
60 This function is not commonly used and is expected to be slow.
61 */
62
63QImage QQuickTextureFactory::image() const
64{
65 return QImage();
66}
67
68/*!
69 Returns a QQuickTextureFactory holding the given \a image.
70
71 This is typically used as a helper in QQuickImageResponse::textureFactory.
72
73 \since 5.6
74 */
75
76QQuickTextureFactory *QQuickTextureFactory::textureFactoryForImage(const QImage &image)
77{
78 if (image.isNull())
79 return nullptr;
80 QQuickTextureFactory *texture = QSGContext::createTextureFactoryFromImage(image);
81 if (texture)
82 return texture;
83 return new QQuickDefaultTextureFactory(image);
84}
85
86
87
88/*!
89 \fn QSGTexture *QQuickTextureFactory::createTexture(QQuickWindow *window) const
90
91 This function is called on the scene graph rendering thread to create a QSGTexture
92 instance from the factory. \a window provides the context which this texture is
93 created in.
94
95 QML will internally cache the returned texture as needed. Each call to this
96 function should return a unique instance.
97
98 The OpenGL context used for rendering is bound when this function is called.
99 */
100
101/*!
102 \fn QSize QQuickTextureFactory::textureSize() const
103
104 Returns the size of the texture. This function will be called from arbitrary threads
105 and should not rely on an OpenGL context bound.
106 */
107
108
109/*!
110 \class QQuickImageResponse
111 \since 5.6
112 \brief The QQuickImageResponse class provides an interface for asynchronous image loading in QQuickAsyncImageProvider.
113 \inmodule QtQuick
114
115 The purpose of an image response is to provide a way for image provider jobs to be executed
116 in an asynchronous way.
117
118 Responses are deleted via \l deleteLater once the finished() signal has been emitted.
119 If you are using QRunnable as base for your QQuickImageResponse
120 ensure automatic deletion is disabled.
121
122 See the \l {imageresponseprovider}{Image Response Provider Example} for a complete implementation.
123
124 \sa QQuickImageProvider
125*/
126
127/*!
128 Constructs the image response
129*/
130QQuickImageResponse::QQuickImageResponse()
131 : QObject(*(new QQuickImageResponsePrivate))
132{
133 qmlobject_connect(this, QQuickImageResponse, SIGNAL(finished()),
134 this, QQuickImageResponse, SLOT(_q_finished()));
135}
136
137/*!
138 Destructs the image response
139*/
140QQuickImageResponse::~QQuickImageResponse()
141{
142}
143
144/*!
145 Returns the error string for the job execution. An empty string means no error.
146*/
147QString QQuickImageResponse::errorString() const
148{
149 return QString();
150}
151
152/*!
153 This method is used to communicate that the response is no longer required by the engine.
154
155 It may be reimplemented to cancel a request in the provider side, however, it is not mandatory.
156
157 A cancelled QQuickImageResponse still needs to emit finished() so that the
158 engine may clean up the QQuickImageResponse.
159
160 \note finished() should not be emitted until the response is complete,
161 regardless of whether or not cancel() was called. If it is called prematurely,
162 the engine may destroy the response while it is still active, leading to a crash.
163*/
164void QQuickImageResponse::cancel()
165{
166}
167
168/*!
169 \fn void QQuickImageResponse::finished()
170
171 Signals that the job execution has finished (be it successfully, because an
172 error happened or because it was cancelled).
173
174 \note Emission of this signal must be the final action the response performs:
175 once the signal is received, the response will subsequently be destroyed by
176 the engine.
177 */
178
179/*!
180 \fn QQuickTextureFactory *QQuickImageResponse::textureFactory() const
181
182 Returns the texture factory for the job. You can use QQuickTextureFactory::textureFactoryForImage
183 if your provider works with QImage. The engine takes ownership of the returned QQuickTextureFactory.
184
185 \note This method will be called only when needed. For example, it may not be called if there is an
186 error or the job is cancelled. Therefore, allocate the QQuickTextureFactory instance only in this
187 method or otherwise ensure its deletion.
188 */
189
190
191/*!
192 \class QQuickImageProvider
193 \since 5.0
194 \inmodule QtQuick
195 \brief The QQuickImageProvider class provides an interface for supporting pixmaps and threaded image requests in QML.
196
197 QQuickImageProvider is used to provide advanced image loading features
198 in QML applications. It allows images in QML to be:
199
200 \list
201 \li Loaded using QPixmaps rather than actual image files
202 \li Loaded asynchronously in a separate thread
203 \endlist
204
205 To specify that an image should be loaded by an image provider, use the
206 \b {"image:"} scheme for the URL source of the image, followed by the
207 identifiers of the image provider and the requested image. For example:
208
209 \qml
210 Image { source: "image://myimageprovider/image.png" }
211 \endqml
212
213 This specifies that the image should be loaded by the image provider named
214 "myimageprovider", and the image to be loaded is named "image.png". The QML engine
215 invokes the appropriate image provider according to the providers that have
216 been registered through QQmlEngine::addImageProvider().
217
218 Note that the identifiers are case-insensitive, but the rest of the URL will be passed on with
219 preserved case. For example, the below snippet would still specify that the image is loaded by the
220 image provider named "myimageprovider", but it would request a different image than the above snippet
221 ("Image.png" instead of "image.png").
222 \qml
223 Image { source: "image://MyImageProvider/Image.png" }
224 \endqml
225
226 If you want the rest of the URL to be case insensitive, you will have to take care
227 of that yourself inside your image provider.
228
229 \section2 An Example
230
231 Here are two images. Their \c source values indicate they should be loaded by
232 an image provider named "colors", and the images to be loaded are "yellow"
233 and "red", respectively:
234
235 \snippet imgprovider/imageprovider-example.qml 0
236
237 When these images are loaded by QML, it looks for a matching image provider
238 and calls its requestImage() or requestPixmap() method (depending on its
239 imageType()) to load the image. The method is called with the \c id
240 parameter set to "yellow" for the first image, and "red" for the second.
241
242 Here is an image provider implementation that can load the images
243 requested by the above QML. This implementation dynamically
244 generates QPixmap images that are filled with the requested color:
245
246 \snippet imgprovider/imageprovider.cpp 0
247
248 To make this provider accessible to QML, it is registered with the QML engine
249 with a "colors" identifier:
250
251 \snippet imgprovider/imageprovider.cpp 1
252 \codeline
253 \snippet imgprovider/imageprovider.cpp 2
254
255 Now the images can be successfully loaded in QML:
256
257 \image imageprovider.png {Rectangle with yellow top half and red
258 bottom half from an image provider}
259
260 See the \l {imageprovider}{Image Provider Example} for the complete implementation.
261 Note that the example registers the provider via a \l{QQmlEngineExtensionPlugin}{plugin}
262 instead of registering it in the application \c main() function as shown above.
263
264 It is possible to provide \l {High Resolution Versions of Images}{"@nx" high DPI syntax}.
265
266
267 \section2 Asynchronous Image Loading
268
269 Image providers that support QImage or Texture loading automatically include support
270 for asychronous loading of images. To enable asynchronous loading for an
271 image source, set the \c asynchronous property to \c true for the relevant
272 \l Image or \l BorderImage object. When this is enabled,
273 the image request to the provider is run in a low priority thread,
274 allowing image loading to be executed in the background, and reducing the
275 performance impact on the user interface.
276
277 To force asynchronous image loading, even for image sources that do not
278 have the \c asynchronous property set to \c true, you may pass the
279 \c QQmlImageProviderBase::ForceAsynchronousImageLoading flag to the image
280 provider constructor. This ensures that all image requests for the
281 provider are handled in a separate thread.
282
283 Asynchronous loading for image providers that provide QPixmap is only supported
284 in platforms that have the ThreadedPixmaps feature, in platforms where
285 pixmaps can only be created in the main thread (i.e. ThreadedPixmaps is not supported)
286 if \l {Image::}{asynchronous} is set to \c true, the value is ignored
287 and the image is loaded synchronously.
288
289 Asynchronous image loading for providers of type other than ImageResponse are
290 executed on a single thread per engine basis. That means that a slow image provider
291 will block the loading of any other request. To avoid that we suggest using QQuickAsyncImageProvider
292 and implement threading on the provider side via a \c QThreadPool or similar.
293 See the \l {imageresponseprovider}{Image Response Provider Example} for a complete implementation.
294
295
296 \section2 Image Caching
297
298 Images returned by a QQuickImageProvider are automatically cached,
299 similar to any image loaded by the QML engine. When an image with a
300 "image://" prefix is loaded from cache, requestImage() and requestPixmap()
301 will not be called for the relevant image provider. If an image should
302 always be fetched from the image provider, and should not be cached at
303 all, set the \c cache property to \c false for the relevant \l Image
304 or \l BorderImage object.
305
306 \sa QQmlEngine::addImageProvider()
307*/
308
309/*!
310 Creates an image provider that will provide images of the given \a type and
311 behave according to the given \a flags.
312*/
313QQuickImageProvider::QQuickImageProvider(ImageType type, Flags flags)
314 : d(new QQuickImageProviderPrivate)
315{
316 d->type = type;
317 d->flags = flags;
318 d->isProviderWithOptions = false;
319}
320
321/*!
322 Destroys the QQuickImageProvider
323
324 \note The destructor of your derived class need to be thread safe.
325*/
326QQuickImageProvider::~QQuickImageProvider()
327{
328 delete d;
329}
330
331/*!
332 Returns the image type supported by this provider.
333*/
334QQuickImageProvider::ImageType QQuickImageProvider::imageType() const
335{
336 return d->type;
337}
338
339/*!
340 Returns the flags set for this provider.
341*/
342QQuickImageProvider::Flags QQuickImageProvider::flags() const
343{
344 return d->flags;
345}
346
347/*!
348 Implement this method to return the image with \a id. The default
349 implementation returns an empty image.
350
351 The \a id is the requested image source, with the "image:" scheme and
352 provider identifier removed. For example, if the image \l{Image::}{source}
353 was "image://myprovider/icons/home", the given \a id would be "icons/home".
354
355 The \a requestedSize corresponds to the \l {Image::sourceSize} requested by
356 an Image item. If \a requestedSize is a valid size, the image
357 returned should be of that size.
358
359 In all cases, \a size must be set to the original size of the image. This
360 is used to set the \l {Item::}{width} and \l {Item::}{height} of the
361 relevant \l Image if these values have not been set explicitly.
362
363 \note this method may be called by multiple threads, so ensure the
364 implementation of this method is reentrant.
365*/
366QImage QQuickImageProvider::requestImage(const QString &id, QSize *size, const QSize& requestedSize)
367{
368 Q_UNUSED(id);
369 Q_UNUSED(size);
370 Q_UNUSED(requestedSize);
371 if (d->type == Image)
372 qWarning("ImageProvider supports Image type but has not implemented requestImage()");
373 return QImage();
374}
375
376/*!
377 Implement this method to return the pixmap with \a id. The default
378 implementation returns an empty pixmap.
379
380 The \a id is the requested image source, with the "image:" scheme and
381 provider identifier removed. For example, if the image \l{Image::}{source}
382 was "image://myprovider/icons/home", the given \a id would be "icons/home".
383
384 The \a requestedSize corresponds to the \l {Image::sourceSize} requested by
385 an Image item. If \a requestedSize is a valid size, the image
386 returned should be of that size.
387
388 In all cases, \a size must be set to the original size of the image. This
389 is used to set the \l {Item::}{width} and \l {Item::}{height} of the
390 relevant \l Image if these values have not been set explicitly.
391
392 \note this method may be called by multiple threads, so ensure the
393 implementation of this method is reentrant.
394*/
395QPixmap QQuickImageProvider::requestPixmap(const QString &id, QSize *size, const QSize& requestedSize)
396{
397 Q_UNUSED(id);
398 Q_UNUSED(size);
399 Q_UNUSED(requestedSize);
400 if (d->type == Pixmap)
401 qWarning("ImageProvider supports Pixmap type but has not implemented requestPixmap()");
402 return QPixmap();
403}
404
405
406/*!
407 Implement this method to return the texture with \a id. The default
408 implementation returns \nullptr.
409
410 The \a id is the requested image source, with the "image:" scheme and
411 provider identifier removed. For example, if the image \l{Image::}{source}
412 was "image://myprovider/icons/home", the given \a id would be "icons/home".
413
414 The \a requestedSize corresponds to the \l {Image::sourceSize} requested by
415 an Image item. If \a requestedSize is a valid size, the image
416 returned should be of that size.
417
418 In all cases, \a size must be set to the original size of the image. This
419 is used to set the \l {Item::}{width} and \l {Item::}{height} of the
420 relevant \l Image if these values have not been set explicitly.
421
422 \note this method may be called by multiple threads, so ensure the
423 implementation of this method is reentrant.
424*/
425
426QQuickTextureFactory *QQuickImageProvider::requestTexture(const QString &id, QSize *size, const QSize &requestedSize)
427{
428 Q_UNUSED(id);
429 Q_UNUSED(size);
430 Q_UNUSED(requestedSize);
431 if (d->type == Texture)
432 qWarning("ImageProvider supports Texture type but has not implemented requestTexture()");
433 return nullptr;
434}
435
436/*!
437 \class QQuickAsyncImageProvider
438 \since 5.6
439 \inmodule QtQuick
440 \brief The QQuickAsyncImageProvider class provides an interface for asynchronous control of QML image requests.
441
442 See the \l {imageresponseprovider}{Image Response Provider Example} for a complete implementation.
443
444 \sa QQuickImageProvider
445*/
446QQuickAsyncImageProvider::QQuickAsyncImageProvider()
447 : QQuickImageProvider(ImageResponse, ForceAsynchronousImageLoading)
448 , d(nullptr) // just as a placeholder in case we need it for the future
449{
450 Q_UNUSED(d);
451}
452
453QQuickAsyncImageProvider::~QQuickAsyncImageProvider()
454{
455}
456
457/*!
458 \fn QQuickImageResponse *QQuickAsyncImageProvider::requestImageResponse(const QString &id, const QSize &requestedSize)
459
460 Implement this method to return the job that will provide the texture with \a id.
461
462 The \a id is the requested image source, with the "image:" scheme and
463 provider identifier removed. For example, if the image \l{Image::}{source}
464 was "image://myprovider/icons/home", the given \a id would be "icons/home".
465
466 The \a requestedSize corresponds to the \l {Image::sourceSize} requested by
467 an Image item. If \a requestedSize is a valid size, the image
468 returned should be of that size.
469
470 \note this method may be called by multiple threads, so ensure the
471 implementation of this method is reentrant.
472*/
473
474
488
489/*!
490 \class QQuickImageProviderOptions
491 \brief The QQuickImageProviderOptions class provides options for QQuickImageProviderWithOptions image requests.
492 \inmodule QtQuick
493 \internal
494
495 \sa QQuickImageProviderWithOptions
496*/
497
498/*!
499 \enum QQuickImageProviderOptions::AutoTransform
500
501 Whether the image provider should apply transformation metadata on read().
502
503 \value UsePluginDefaultTransform Image provider should do its default behavior on whether applying transformation metadata on read or not
504 \value ApplyTransform Image provider should apply transformation metadata on read
505 \value DoNotApplyTransform Image provider should not apply transformation metadata on read
506*/
507
508QQuickImageProviderOptions::QQuickImageProviderOptions()
509 : d(new QQuickImageProviderOptionsPrivate())
510{
511}
512
513QQuickImageProviderOptions::~QQuickImageProviderOptions()
514{
515}
516
517QQuickImageProviderOptions::QQuickImageProviderOptions(const QQuickImageProviderOptions &other)
518 : d(other.d)
519{
520}
521
522QQuickImageProviderOptions& QQuickImageProviderOptions::operator=(const QQuickImageProviderOptions &other)
523{
524 d = other.d;
525 return *this;
526}
527
528bool QQuickImageProviderOptions::operator==(const QQuickImageProviderOptions &other) const
529{
530 return d->autoTransform == other.d->autoTransform &&
531 d->preserveAspectRatioCrop == other.d->preserveAspectRatioCrop &&
532 d->preserveAspectRatioFit == other.d->preserveAspectRatioFit &&
533 d->targetColorSpace == other.d->targetColorSpace;
534}
535
536/*!
537 Returns whether the image provider should apply transformation metadata on read().
538*/
539QQuickImageProviderOptions::AutoTransform QQuickImageProviderOptions::autoTransform() const
540{
541 return d->autoTransform;
542}
543
544void QQuickImageProviderOptions::setAutoTransform(QQuickImageProviderOptions::AutoTransform autoTransform)
545{
546 d->autoTransform = autoTransform;
547}
548
549/*!
550 Returns whether the image request is for a PreserveAspectCrop Image.
551 This allows the provider to better optimize the size of the returned image.
552*/
553bool QQuickImageProviderOptions::preserveAspectRatioCrop() const
554{
555 return d->preserveAspectRatioCrop;
556}
557
558void QQuickImageProviderOptions::setPreserveAspectRatioCrop(bool preserveAspectRatioCrop)
559{
560 d->preserveAspectRatioCrop = preserveAspectRatioCrop;
561}
562
563/*!
564 Returns whether the image request is for a PreserveAspectFit Image.
565 This allows the provider to better optimize the size of the returned image.
566*/
567bool QQuickImageProviderOptions::preserveAspectRatioFit() const
568{
569 return d->preserveAspectRatioFit;
570}
571
572void QQuickImageProviderOptions::setPreserveAspectRatioFit(bool preserveAspectRatioFit)
573{
574 d->preserveAspectRatioFit = preserveAspectRatioFit;
575}
576
577/*!
578 Returns the color space the image provider should return the image in.
579*/
580QColorSpace QQuickImageProviderOptions::targetColorSpace() const
581{
582 return d->targetColorSpace;
583}
584
585void QQuickImageProviderOptions::setTargetColorSpace(const QColorSpace &colorSpace)
586{
587 d->targetColorSpace = colorSpace;
588}
589
590/*!
591 Returns the requested source clip rect.
592*/
593QRectF QQuickImageProviderOptions::sourceClipRect() const
594{
595 return d->sourceClipRect;
596}
597
598void QQuickImageProviderOptions::setSourceClipRect(const QRectF &rect)
599{
600 d->sourceClipRect = rect;
601}
602
603QQuickImageProviderWithOptions::QQuickImageProviderWithOptions(ImageType type, Flags flags)
604 : QQuickAsyncImageProvider()
605{
606 QQuickImageProvider::d->type = type;
607 QQuickImageProvider::d->flags = flags;
608 QQuickImageProvider::d->isProviderWithOptions = true;
609}
610
611QImage QQuickImageProviderWithOptions::requestImage(const QString &id, QSize *size, const QSize& requestedSize)
612{
613 return requestImage(id, size, requestedSize, QQuickImageProviderOptions());
614}
615
616QPixmap QQuickImageProviderWithOptions::requestPixmap(const QString &id, QSize *size, const QSize& requestedSize)
617{
618 return requestPixmap(id, size, requestedSize, QQuickImageProviderOptions());
619}
620
621QQuickTextureFactory *QQuickImageProviderWithOptions::requestTexture(const QString &id, QSize *size, const QSize &requestedSize)
622{
623 return requestTexture(id, size, requestedSize, QQuickImageProviderOptions());
624}
625
626QImage QQuickImageProviderWithOptions::requestImage(const QString &id, QSize *size, const QSize& requestedSize, const QQuickImageProviderOptions &options)
627{
628 Q_UNUSED(options);
629 return QQuickAsyncImageProvider::requestImage(id, size, requestedSize);
630}
631
632QPixmap QQuickImageProviderWithOptions::requestPixmap(const QString &id, QSize *size, const QSize& requestedSize, const QQuickImageProviderOptions &options)
633{
634 Q_UNUSED(options);
635 return QQuickAsyncImageProvider::requestPixmap(id, size, requestedSize);
636}
637
638QQuickTextureFactory *QQuickImageProviderWithOptions::requestTexture(const QString &id, QSize *size, const QSize &requestedSize, const QQuickImageProviderOptions &options)
639{
640 Q_UNUSED(options);
641 return QQuickAsyncImageProvider::requestTexture(id, size, requestedSize);
642}
643
644QQuickImageResponse *QQuickImageProviderWithOptions::requestImageResponse(const QString &id, const QSize &requestedSize)
645{
646 Q_UNUSED(id);
647 Q_UNUSED(requestedSize);
648 if (imageType() == ImageResponse)
649 qWarning("ImageProvider is of ImageResponse type but has not implemented requestImageResponse()");
650 return nullptr;
651}
652
653QQuickImageResponse *QQuickImageProviderWithOptions::requestImageResponse(const QString &id, const QSize &requestedSize, const QQuickImageProviderOptions &options)
654{
655 Q_UNUSED(options);
656 return requestImageResponse(id, requestedSize);
657}
658
659/*!
660 Returns the recommended scaled image size for loading and storage. This is
661 calculated according to the native pixel size of the image \a originalSize,
662 the requested sourceSize \a requestedSize, the image file format \a format,
663 and \a options. If the calculation otherwise concludes that scaled loading
664 is not recommended, an invalid size is returned.
665*/
666QSize QQuickImageProviderWithOptions::loadSize(const QSize &originalSize, const QSize &requestedSize, const QByteArray &format, const QQuickImageProviderOptions &options,
667 qreal devicePixelRatio)
668{
669 QSize res;
670 const bool formatIsScalable = (format == "svg" || format == "svgz" || format == "pdf");
671 const bool noRequestedSize = requestedSize.width() <= 0 && requestedSize.height() <= 0;
672 if ((noRequestedSize && !formatIsScalable) || originalSize.isEmpty())
673 return res;
674
675 // If no sourceSize was set and we're loading an SVG, ensure that we provide
676 // a default size that accounts for DPR so that the image isn't blurry.
677 if (noRequestedSize && formatIsScalable)
678 return originalSize * devicePixelRatio;
679
680 const bool preserveAspectCropOrFit = options.preserveAspectRatioCrop() || options.preserveAspectRatioFit();
681
682 if (!preserveAspectCropOrFit && formatIsScalable && !requestedSize.isEmpty())
683 return requestedSize;
684
685 qreal ratio = 0.0;
686 if (requestedSize.width() && (preserveAspectCropOrFit || formatIsScalable ||
687 requestedSize.width() < originalSize.width())) {
688 ratio = qreal(requestedSize.width()) / originalSize.width();
689 }
690 if (requestedSize.height() && (preserveAspectCropOrFit || formatIsScalable ||
691 requestedSize.height() < originalSize.height())) {
692 qreal hr = qreal(requestedSize.height()) / originalSize.height();
693 if (ratio == 0.0)
694 ratio = hr;
695 else if (!preserveAspectCropOrFit && (hr < ratio))
696 ratio = hr;
697 else if (preserveAspectCropOrFit && (hr > ratio))
698 ratio = hr;
699 }
700 if (ratio > 0.0) {
701 res.setHeight(qRound(originalSize.height() * ratio));
702 res.setWidth(qRound(originalSize.width() * ratio));
703 }
704 return res;
705}
706
707QQuickImageProviderWithOptions *QQuickImageProviderWithOptions::checkedCast(QQuickImageProvider *provider)
708{
709 if (provider && provider->d && provider->d->isProviderWithOptions)
710 return static_cast<QQuickImageProviderWithOptions *>(provider);
711
712 return nullptr;
713}
714
715QT_END_NAMESPACE
716
717#include "moc_qquickimageprovider.cpp"
QQuickImageProviderOptions::AutoTransform autoTransform
Combined button and popup list for selecting options.