| 1 | #pragma once |
| 2 | |
| 3 | #include <QObject> |
| 4 | #include <QQmlEngine> |
| 5 | |
| 6 | class GettingStartedTipsController; |
| 7 | |
| 8 | #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) |
| 9 | Q_MOC_INCLUDE("GettingStartedTipsController.hxx") |
| 10 | #endif |
| 11 | class GettingStartedScopeAttached : public QObject |
| 12 | { |
| 13 | Q_OBJECT |
| 14 | |
| 15 | Q_PROPERTY(GettingStartedTipsController* controller READ controller WRITE setController NOTIFY controllerChanged) |
| 16 | public: |
| 17 | GettingStartedScopeAttached(QObject* parent); |
| 18 | |
| 19 | GettingStartedTipsController* controller() const |
| 20 | { |
| 21 | return _controller; |
| 22 | } |
| 23 | |
| 24 | public slots: |
| 25 | void setController(GettingStartedTipsController* controller); |
| 26 | |
| 27 | signals: |
| 28 | void controllerChanged(); |
| 29 | |
| 30 | private: |
| 31 | GettingStartedTipsController* _controller = nullptr; |
| 32 | }; |
| 33 | |
| 34 | class GettingStartedScope : public QObject |
| 35 | { |
| 36 | Q_OBJECT |
| 37 | |
| 38 | public: |
| 39 | explicit GettingStartedScope(QObject *parent = nullptr); |
| 40 | |
| 41 | static GettingStartedScopeAttached* qmlAttachedProperties(QObject *object); |
| 42 | signals: |
| 43 | |
| 44 | }; |
| 45 | |
| 46 | QML_DECLARE_TYPEINFO(GettingStartedScope, QML_HAS_ATTACHED_PROPERTIES) |