| 1 | #ifndef FGQMLINSTANCE_HXX |
| 2 | #define FGQMLINSTANCE_HXX |
| 3 | |
| 4 | #include <QObject> |
| 5 | |
| 6 | #include <QJSValue> |
| 7 | |
| 8 | // forward decls |
| 9 | class FGQmlPropertyNode; |
| 10 | |
| 11 | class FGQmlInstance : public QObject |
| 12 | { |
| 13 | Q_OBJECT |
| 14 | public: |
| 15 | explicit FGQmlInstance(QObject *parent = nullptr); |
| 16 | |
| 17 | Q_INVOKABLE bool command(QString name, QJSValue args); |
| 18 | |
| 19 | /** |
| 20 | * retrieve a property by its global path |
| 21 | */ |
| 22 | Q_INVOKABLE FGQmlPropertyNode* property(QString path, bool create = false) const; |
| 23 | signals: |
| 24 | |
| 25 | public slots: |
| 26 | }; |
| 27 | |
| 28 | #endif // FGQMLINSTANCE_HXX |