#ifndef HSQML_ENGINE_H #define HSQML_ENGINE_H #include #include #include #include #include #include #include "hsqml.h" class HsQMLObjectProxy; class HsQMLWindow; struct HsQMLEngineConfig { HsQMLEngineConfig() : contextObject(NULL) , stopCb(NULL) {} HsQMLObjectProxy* contextObject; QString initialURL; HsQMLTrivialCb stopCb; }; class HsQMLEngine : public QObject { Q_OBJECT public: HsQMLEngine(const HsQMLEngineConfig&); ~HsQMLEngine(); bool eventFilter(QObject*, QEvent*); QQmlEngine* declEngine(); private: Q_DISABLE_COPY(HsQMLEngine) Q_SLOT void componentStatus(QQmlComponent::Status); QQmlEngine mEngine; QQmlComponent mComponent; QList mObjects; HsQMLTrivialCb mStopCb; }; #endif /*HSQML_ENGINE_H*/