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 QQUICKGRAPHSCOLOR_P_H |
15 | #define QQUICKGRAPHSCOLOR_P_H |
16 | |
17 | #include <QtGui/QColor> |
18 | #include <QtQml/qqml.h> |
19 | #include <private/qgraphsglobal_p.h> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | enum class GradientType { |
23 | Base, |
24 | Single, |
25 | Multi, |
26 | }; |
27 | |
28 | class QQuickGraphsColor : public QObject |
29 | { |
30 | Q_OBJECT |
31 | Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) |
32 | |
33 | QML_NAMED_ELEMENT(Color) |
34 | |
35 | public: |
36 | QQuickGraphsColor(QObject *parent = 0); |
37 | ~QQuickGraphsColor() override; |
38 | |
39 | void setColor(QColor color); |
40 | QColor color() const; |
41 | |
42 | Q_SIGNALS: |
43 | void colorChanged(QColor color); |
44 | |
45 | private: |
46 | QColor m_color; |
47 | }; |
48 | |
49 | QT_END_NAMESPACE |
50 | |
51 | #endif |
52 |