1 | // Copyright (C) 2016 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 QtDataVisualization 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/datavisualizationglobal_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 | QML_ADDED_IN_VERSION(1, 0) |
30 | |
31 | public: |
32 | DeclarativeColor(QObject *parent = 0); |
33 | |
34 | void setColor(const QColor &color); |
35 | QColor color() const; |
36 | |
37 | Q_SIGNALS: |
38 | void colorChanged(const QColor &color); |
39 | |
40 | private: |
41 | QColor m_color; |
42 | }; |
43 | |
44 | QT_END_NAMESPACE |
45 | |
46 | #endif |
47 | |