2 #include <score/model/Skin.hpp>
3 #include <score/serialization/DataStreamFwd.hpp>
4 #include <score/tools/Debug.hpp>
5 #include <score/tools/std/Optional.hpp>
22 friend bool operator==(
ColorRef lhs,
ColorRef rhs) {
return lhs.ref == rhs.ref; }
24 friend bool operator!=(
ColorRef lhs,
ColorRef rhs) {
return lhs.ref != rhs.ref; }
27 constexpr
ColorRef() noexcept =
default;
34 : ref{&(score::Skin::instance().*s)}
46 ref = &(score::Skin::instance().*s);
49 const Brush& getBrush()
const
55 QString name()
const noexcept {
return score::Skin::instance().toString(ref); }
57 static std::optional<ColorRef> ColorFromString(
const QString&) noexcept;
58 static std::optional<ColorRef> SimilarColor(QColor other) noexcept;
65 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_BASE_EXPORT,
score::ColorRef);
Base toolkit upon which the software is built.
Definition: Application.cpp:90
A reference to a color. Used for skinning.
Definition: ColorReference.hpp:21