qmlfrontend/hwengine.h
branchqmlfrontend
changeset 12862 90f927b4b9e1
child 12863 0c6fb706f747
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qmlfrontend/hwengine.h	Fri Dec 22 23:59:03 2017 +0100
@@ -0,0 +1,37 @@
+#ifndef HWENGINE_H
+#define HWENGINE_H
+
+#include <QObject>
+
+#include "flib.h"
+
+class QQmlEngine;
+
+class HWEnginePrivate;
+
+class HWEngine : public QObject {
+    Q_OBJECT
+
+public:
+    explicit HWEngine(QQmlEngine* engine, QObject* parent = nullptr);
+    ~HWEngine();
+
+    static void exposeToQML();
+
+signals:
+    void previewIsRendering();
+    void previewImageChanged();
+    void previewHogCountChanged(int count);
+
+public slots:
+
+private:
+    QQmlEngine* m_engine;
+
+    static void guiMessagesCallback(void* context, MessageType mt, const char* msg, uint32_t len);
+
+private slots:
+    void engineMessageHandler(MessageType mt, const QByteArray& msg);
+};
+
+#endif // HWENGINE_H