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
qcolortransform.h
Go to the documentation of this file.
1// Copyright (C) 2018 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
4#ifndef QCOLORTRANSFORM_H
5#define QCOLORTRANSFORM_H
6
7#include <QtGui/qtguiglobal.h>
8#include <QtGui/qrgb.h>
9#include <QtCore/qshareddata.h>
10
12
13class QColor;
14class QRgba64;
17class qfloat16;
18template<typename T>
19class QRgbaFloat;
20typedef QRgbaFloat<qfloat16> QRgbaFloat16;
21typedef QRgbaFloat<float> QRgbaFloat32;
22
23QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(QColorTransformPrivate, Q_GUI_EXPORT)
24
26{
27public:
28 QColorTransform() noexcept = default;
31 QColorTransform(QColorTransform &&colorTransform) = default;
32 QColorTransform &operator=(const QColorTransform &other) noexcept
33 {
34 QColorTransform{other}.swap(*this);
35 return *this;
36 }
38
39 void swap(QColorTransform &other) noexcept { d.swap(other.d); }
40 Q_GUI_EXPORT bool isIdentity() const noexcept;
41
42 Q_GUI_EXPORT QRgb map(QRgb argb) const;
43 Q_GUI_EXPORT QRgba64 map(QRgba64 rgba64) const;
44 Q_GUI_EXPORT QRgbaFloat16 map(QRgbaFloat16 rgbafp16) const;
45 Q_GUI_EXPORT QRgbaFloat32 map(QRgbaFloat32 rgbafp32) const;
46 Q_GUI_EXPORT QColor map(const QColor &color) const;
47
48 friend bool operator==(const QColorTransform &ct1, const QColorTransform &ct2)
49 { return ct1.compare(ct2); }
50 friend bool operator!=(const QColorTransform &ct1, const QColorTransform &ct2)
51 { return !ct1.compare(ct2); }
52
53private:
54 friend class QColorSpacePrivate;
56 Q_GUI_EXPORT bool compare(const QColorTransform &other) const;
57
58 QExplicitlySharedDataPointer<QColorTransformPrivate> d;
59};
60
61Q_DECLARE_SHARED(QColorTransform)
62
63QT_END_NAMESPACE
64
65#endif // QCOLORTRANSFORM_H
The QColorTransform class is a transformation between color spaces.
QColorTransform(QColorTransform &&colorTransform)=default
friend bool operator!=(const QColorTransform &ct1, const QColorTransform &ct2)
QColorTransform & operator=(const QColorTransform &other) noexcept
QColorTransform() noexcept=default
Q_GUI_EXPORT ~QColorTransform()
friend bool operator==(const QColorTransform &ct1, const QColorTransform &ct2)
Definition qmap.h:189
\keyword 16-bit Floating Point Support\inmodule QtCore \inheaderfile QFloat16
Definition qfloat16.h:48
Combined button and popup list for selecting options.
QRgbaFloat< float > QRgbaFloat32
QRgbaFloat< qfloat16 > QRgbaFloat16
Q_TRACE_METADATA(qtcore, "ENUM { AUTO, RANGE User ... MaxUser } QEvent::Type;")
#define IWX_MSB(b)
Definition qimage.cpp:4386
static QImage rotated90(const QImage &src)
Definition qimage.cpp:4737
static void copyMetadata(QImage *dst, const QImage &src)
Definition qimage.cpp:1177
static void copyMetadata(QImageData *dst, const QImageData *src)
Definition qimage.cpp:1168
static int next_qimage_serial_number()
Definition qimage.cpp:85
#define QIMAGE_SANITYCHECK_MEMORY(image)
Definition qimage.cpp:63
static void copyPhysicalMetadata(QImageData *dst, const QImageData *src)
Definition qimage.cpp:1161
#define IWX_LSB(b)
Definition qimage.cpp:4395
static QImage rotated270(const QImage &src)
Definition qimage.cpp:4781
QMap< QString, QString > qt_getImageText(const QImage &image, const QString &description)
Definition qimage.cpp:6491
Q_GUI_EXPORT void qt_imageTransform(QImage &src, QImageIOHandler::Transformations orient)
Definition qimage.cpp:6478
#define PIX(x, y)
static QImage rotated180(const QImage &src)
Definition qimage.cpp:4763
static Qt::Orientations toOrientations(QImageIOHandler::Transformations orient)
Definition qimage.cpp:6468
QMap< QString, QString > qt_getImageTextFromDescription(const QString &description)
Definition qimage.cpp:6502