diff options
Diffstat (limited to 'src/quick/util/qquickimageprovider.cpp')
-rw-r--r-- | src/quick/util/qquickimageprovider.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/quick/util/qquickimageprovider.cpp b/src/quick/util/qquickimageprovider.cpp index db82b2d807..80873e2ad5 100644 --- a/src/quick/util/qquickimageprovider.cpp +++ b/src/quick/util/qquickimageprovider.cpp @@ -43,6 +43,7 @@ #include "qquickpixmapcache_p.h" #include <QtQuick/private/qsgcontext_p.h> #include <private/qqmlglobal_p.h> +#include <QtGui/qcolorspace.h> QT_BEGIN_NAMESPACE @@ -510,6 +511,7 @@ public: { } + QColorSpace targetColorSpace; QQuickImageProviderOptions::AutoTransform autoTransform = QQuickImageProviderOptions::UsePluginDefaultTransform; bool preserveAspectRatioCrop = false; bool preserveAspectRatioFit = false; @@ -558,7 +560,8 @@ bool QQuickImageProviderOptions::operator==(const QQuickImageProviderOptions &ot { return d->autoTransform == other.d->autoTransform && d->preserveAspectRatioCrop == other.d->preserveAspectRatioCrop && - d->preserveAspectRatioFit == other.d->preserveAspectRatioFit; + d->preserveAspectRatioFit == other.d->preserveAspectRatioFit && + d->targetColorSpace == other.d->targetColorSpace; } /*! @@ -602,6 +605,19 @@ void QQuickImageProviderOptions::setPreserveAspectRatioFit(bool preserveAspectRa d->preserveAspectRatioFit = preserveAspectRatioFit; } +/*! + Returns the color space the image provider should return the image in. +*/ +QColorSpace QQuickImageProviderOptions::targetColorSpace() const +{ + return d->targetColorSpace; +} + +void QQuickImageProviderOptions::setTargetColorSpace(const QColorSpace &colorSpace) +{ + d->targetColorSpace = colorSpace; +} + QQuickImageProviderWithOptions::QQuickImageProviderWithOptions(ImageType type, Flags flags) : QQuickAsyncImageProvider() { |