1 | // Copyright (C) 2023 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | // |
5 | // W A R N I N G |
6 | // ------------- |
7 | // |
8 | // This file is not part of the QtGraphs API. It exists purely as an |
9 | // implementation detail. This header file may change from version to |
10 | // version without notice, or even be removed. |
11 | // |
12 | // We mean it. |
13 | |
14 | #ifndef DECLARATIVECOLOR_P_H |
15 | #define DECLARATIVECOLOR_P_H |
16 | |
17 | #include <private/graphsglobal_p.h> |
18 | #include <QtGui/QColor> |
19 | #include <QtQml/qqml.h> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | class DeclarativeColor : public QObject |
24 | { |
25 | Q_OBJECT |
26 | Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) |
27 | |
28 | QML_NAMED_ELEMENT(ThemeColor) |
29 | |
30 | public: |
31 | DeclarativeColor(QObject *parent = 0); |
32 | |
33 | void setColor(const QColor &color); |
34 | QColor color() const; |
35 | |
36 | Q_SIGNALS: |
37 | void colorChanged(const QColor &color); |
38 | |
39 | private: |
40 | QColor m_color; |
41 | }; |
42 | |
43 | QT_END_NAMESPACE |
44 | |
45 | #endif |
46 | |