1 | // Copyright (C) 2023 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #include "declarativecolor_p.h" |
5 | |
6 | QT_BEGIN_NAMESPACE |
7 | |
8 | DeclarativeColor::DeclarativeColor(QObject *parent) |
9 | : QObject(parent) |
10 | { |
11 | } |
12 | |
13 | void DeclarativeColor::setColor(const QColor &color) |
14 | { |
15 | if (m_color != color) { |
16 | m_color = color; |
17 | emit colorChanged(color); |
18 | } |
19 | } |
20 | |
21 | QColor DeclarativeColor::color() const |
22 | { |
23 | return m_color; |
24 | } |
25 | |
26 | QT_END_NAMESPACE |
27 |