qmlfrontend/hwengine.h
author unc0rr
Fri, 22 Dec 2017 23:59:03 +0100
branchqmlfrontend
changeset 12862 90f927b4b9e1
child 12863 0c6fb706f747
permissions -rw-r--r--
Start hacking new frontend
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12862
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
     1
#ifndef HWENGINE_H
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
     2
#define HWENGINE_H
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
     3
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
     4
#include <QObject>
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
     5
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
     6
#include "flib.h"
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
     7
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
     8
class QQmlEngine;
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
     9
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    10
class HWEnginePrivate;
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    11
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    12
class HWEngine : public QObject {
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    13
    Q_OBJECT
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    14
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    15
public:
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    16
    explicit HWEngine(QQmlEngine* engine, QObject* parent = nullptr);
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    17
    ~HWEngine();
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    18
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    19
    static void exposeToQML();
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    20
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    21
signals:
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    22
    void previewIsRendering();
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    23
    void previewImageChanged();
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    24
    void previewHogCountChanged(int count);
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    25
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    26
public slots:
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    27
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    28
private:
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    29
    QQmlEngine* m_engine;
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    30
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    31
    static void guiMessagesCallback(void* context, MessageType mt, const char* msg, uint32_t len);
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    32
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    33
private slots:
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    34
    void engineMessageHandler(MessageType mt, const QByteArray& msg);
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    35
};
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    36
90f927b4b9e1 Start hacking new frontend
unc0rr
parents:
diff changeset
    37
#endif // HWENGINE_H