7#include "constpropagatinguniquepointer.h"
8#include "genericcolor.h"
10#include <qcontainerfwd.h>
16#include <qsharedpointer.h>
18#include <qversionnumber.h>
21#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
22#include <qtmetamacros.h>
24#include <qobjectdefs.h>
27Q_DECLARE_METATYPE(cmsColorSpaceSignature)
28Q_DECLARE_METATYPE(cmsProfileClassSignature)
32class RgbColorSpacePrivate;
115class RgbColorSpace :
public QObject
124 Q_PROPERTY(QString profileAbsoluteFilePath READ profileAbsoluteFilePath CONSTANT)
135 Q_PROPERTY(cmsProfileClassSignature profileClass READ profileClass CONSTANT)
147 Q_PROPERTY(cmsColorSpaceSignature profileColorModel READ profileColorModel CONSTANT)
157 Q_PROPERTY(QString profileCopyright READ profileCopyright CONSTANT)
164 Q_PROPERTY(QDateTime profileCreationDateTime READ profileCreationDateTime CONSTANT)
171 Q_PROPERTY(qint64 profileFileSize READ profileFileSize CONSTANT)
176 Q_PROPERTY(
bool profileHasClut READ profileHasClut CONSTANT)
181 Q_PROPERTY(
bool profileHasMatrixShaper READ profileHasMatrixShaper CONSTANT)
186 Q_PROPERTY(QVersionNumber profileIccVersion READ profileIccVersion CONSTANT)
196 Q_PROPERTY(QString profileManufacturer READ profileManufacturer CONSTANT)
207 Q_PROPERTY(
double profileMaximumCielchD50Chroma READ profileMaximumCielchD50Chroma CONSTANT)
218 Q_PROPERTY(
double profileMaximumOklchChroma READ profileMaximumOklchChroma CONSTANT)
228 Q_PROPERTY(QString profileModel READ profileModel CONSTANT)
242 Q_PROPERTY(QString profileName READ profileName CONSTANT)
256 Q_PROPERTY(cmsColorSpaceSignature profilePcsColorModel READ profilePcsColorModel CONSTANT)
267 Q_PROPERTY(QStringList profileTagSignatures READ profileTagSignatures CONSTANT)
270 [[nodiscard]]
Q_INVOKABLE static QSharedPointer<PerceptualColor::RgbColorSpace> tryCreateFromFile(
const QString &fileName);
271 [[nodiscard]]
Q_INVOKABLE static QSharedPointer<PerceptualColor::RgbColorSpace> createSrgb();
274 virtual ~RgbColorSpace() noexcept override;
275 [[nodiscard]]
Q_INVOKABLE virtual
bool isCielabD50InGamut(const cmsCIELab &lab) const;
276 [[nodiscard]]
Q_INVOKABLE virtual
bool isCielchD50InGamut(const PerceptualColor::GenericColor &lch) const;
277 [[nodiscard]]
Q_INVOKABLE virtual
bool isOklchInGamut(const PerceptualColor::GenericColor &lch) const;
280 [[nodiscard]] QString profileAbsoluteFilePath() const;
283 [[nodiscard]] cmsProfileClassSignature profileClass() const;
286 [[nodiscard]] cmsColorSpaceSignature profileColorModel() const;
289 [[nodiscard]] QString profileCopyright() const;
292 [[nodiscard]] QDateTime profileCreationDateTime() const;
295 [[nodiscard]] qint64 profileFileSize() const;
298 [[nodiscard]]
bool profileHasClut() const;
301 [[nodiscard]]
bool profileHasMatrixShaper() const;
304 [[nodiscard]] QVersionNumber profileIccVersion() const;
307 [[nodiscard]] QString profileManufacturer() const;
310 [[nodiscard]]
double profileMaximumCielchD50Chroma() const;
313 [[nodiscard]]
double profileMaximumOklchChroma() const;
316 [[nodiscard]] QString profileModel() const;
319 [[nodiscard]] QString profileName() const;
322 [[nodiscard]] cmsColorSpaceSignature profilePcsColorModel() const;
325 [[nodiscard]] QStringList profileTagSignatures() const;
330 [[nodiscard]]
Q_INVOKABLE virtual PerceptualColor::GenericColor reduceCielchD50ChromaToFitIntoGamut(const PerceptualColor::GenericColor &cielchD50color) const;
332 [[nodiscard]]
Q_INVOKABLE virtual PerceptualColor::GenericColor reduceOklchChromaToFitIntoGamut(const PerceptualColor::GenericColor &oklchColor) const;
333 [[nodiscard]]
Q_INVOKABLE virtual cmsCIELab toCielabD50(const QRgba64 rgbColor) const;
334 [[nodiscard]]
Q_INVOKABLE virtual PerceptualColor::GenericColor toCielchD50(const QRgba64 rgbColor) const;
335 [[nodiscard]]
Q_INVOKABLE static cmsCIELab fromLchToCmsCIELab(const PerceptualColor::GenericColor &lch);
336 [[nodiscard]]
Q_INVOKABLE virtual QRgb fromCielchD50ToQRgbBound(const PerceptualColor::GenericColor &cielchD50) const;
337 [[nodiscard]]
Q_INVOKABLE virtual QRgb fromCielabD50ToQRgbOrTransparent(const cmsCIELab &lab) const;
338 [[nodiscard]]
Q_INVOKABLE virtual PerceptualColor::GenericColor fromCielchD50ToRgb1(const PerceptualColor::GenericColor &lch) const;
341 Q_DISABLE_COPY(RgbColorSpace)
357 friend class RgbColorSpacePrivate;
359 ConstPropagatingUniquePointer<RgbColorSpacePrivate> d_pointer;
362 friend class TestRgbColorSpace;
The namespace of this library.
QObject * parent() const const