ACF $AcfVersion:0$
CIlluminant.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
6#include <icmm/IIlluminant.h>
7
8
9namespace icmm
10{
11
12
13class CIlluminant: virtual public IIlluminant
14{
15public:
20
25 const QString& illuminantName,
26 const icmm::CVarColor& whitePoint);
27
31 CIlluminant(const CIlluminant& other);
32
33 // reimplemented (IWhitePointProvider)
34 virtual icmm::CVarColor GetWhitePoint() const override;
35
36 // reimplemented (IIluminant)
37 virtual void SetWhitePoint(const icmm::CVarColor& whitePoint) override;
38 virtual QString GetIlluminantName() const override;
39 virtual void SetIlluminantName(const QString& illuminantName) override;
40 virtual StandardIlluminant GetIlluminantType() const override;
41 virtual void SetIlluminantType(const StandardIlluminant& illuminantType) override;
42
43 // reimplemented (istd::IChangeable)
44 virtual int GetSupportedOperations() const override;
45 virtual bool CopyFrom(const istd::IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
46 virtual bool IsEqual(const istd::IChangeable& other) const override;
48
49 // reimplemented (iser::ISerializable)
50 virtual bool Serialize(iser::IArchive& archive) override;
51
52protected:
54
55private:
57 QString m_illuminantName = "D50";
58 icmm::CVarColor m_whitePoint;
59};
60
61
62} // namespace icmm
63
64
CIlluminant(const CIlluminant &other)
Copy constructor.
CIlluminant(StandardIlluminant illuminantType=StandardIlluminant::D50)
Construct an illuminant based on a standard type.
CIlluminant(const QString &illuminantName, const icmm::CVarColor &whitePoint)
Construct a custom Illuminant.
virtual istd::IChangeableUniquePtr CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
void InitFromStandardIlluminant(StandardIlluminant illuminantType)
virtual void SetIlluminantType(const StandardIlluminant &illuminantType) override
Sets the standard illuminant type.
virtual StandardIlluminant GetIlluminantType() const override
Gets the standard illuminant type.
virtual icmm::CVarColor GetWhitePoint() const override
Gets the white point as a color value.
virtual QString GetIlluminantName() const override
Gets the human-readable name of this illuminant.
virtual void SetWhitePoint(const icmm::CVarColor &whitePoint) override
Sets the white point for this illuminant.
virtual void SetIlluminantName(const QString &illuminantName) override
Sets the human-readable name for this illuminant.
virtual bool IsEqual(const istd::IChangeable &other) const override
Compare this object with another object.
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
virtual bool CopyFrom(const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
Copy this object from another one.
virtual int GetSupportedOperations() const override
Get set of flags for supported operations.
Generic color implementation with variable number of color components.
Definition CVarColor.h:176
Interface for illuminant objects with configurable properties.
Represents an input/output persistence archive for object serialization.
Definition IArchive.h:164
Common interface for data model objects, which can be changed.
Definition IChangeable.h:28
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Contains color management classes.
StandardIlluminant
Definition icmm.h:49