1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QQMLDEBUGSTATESDELEGATE_P_H |
5 | #define QQMLDEBUGSTATESDELEGATE_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtQml/qtqmlglobal.h> |
19 | #include <QtCore/QList> |
20 | #include <QtCore/QPointer> |
21 | #include <QtCore/private/qglobal_p.h> |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | #if !QT_CONFIG(qml_debug) |
26 | |
27 | class QQmlDebugStatesDelegate {}; |
28 | |
29 | #else |
30 | |
31 | class QQmlContext; |
32 | class QQmlProperty; |
33 | class QObject; |
34 | class QString; |
35 | class QVariant; |
36 | |
37 | class QQmlDebugStatesDelegate |
38 | { |
39 | protected: |
40 | QQmlDebugStatesDelegate() {} |
41 | |
42 | public: |
43 | virtual ~QQmlDebugStatesDelegate() {} |
44 | |
45 | virtual void buildStatesList(bool cleanList, |
46 | const QList<QPointer<QObject> > &instances) = 0; |
47 | virtual void updateBinding(QQmlContext *context, |
48 | const QQmlProperty &property, |
49 | const QVariant &expression, bool isLiteralValue, |
50 | const QString &fileName, int line, int column, |
51 | bool *inBaseState) = 0; |
52 | virtual bool setBindingForInvalidProperty(QObject *object, |
53 | const QString &propertyName, |
54 | const QVariant &expression, |
55 | bool isLiteralValue) = 0; |
56 | virtual void resetBindingForInvalidProperty(QObject *object, |
57 | const QString &propertyName) = 0; |
58 | |
59 | private: |
60 | Q_DISABLE_COPY(QQmlDebugStatesDelegate) |
61 | }; |
62 | |
63 | #endif |
64 | |
65 | QT_END_NAMESPACE |
66 | |
67 | #endif // QQMLDEBUGSTATESDELEGATE_P_H |
68 | |