author | unc0rr |
Tue, 26 Dec 2017 01:36:58 +0100 | |
branch | qmlfrontend |
changeset 12861 | 488782d9aba9 |
parent 12858 | 0c6fb706f747 |
child 12863 | fe16fa088b69 |
permissions | -rw-r--r-- |
12857 | 1 |
#ifndef HWENGINE_H |
2 |
#define HWENGINE_H |
|
3 |
||
12858
0c6fb706f747
More refactoring in attempt to move away from frontlib
unc0rr
parents:
12857
diff
changeset
|
4 |
#include <QList> |
12857 | 5 |
#include <QObject> |
6 |
||
7 |
#include "flib.h" |
|
8 |
||
9 |
class QQmlEngine; |
|
12861 | 10 |
class PreviewImageProvider; |
11 |
class RunQueue; |
|
12857 | 12 |
|
13 |
class HWEngine : public QObject { |
|
14 |
Q_OBJECT |
|
15 |
||
16 |
public: |
|
17 |
explicit HWEngine(QQmlEngine* engine, QObject* parent = nullptr); |
|
18 |
~HWEngine(); |
|
19 |
||
20 |
static void exposeToQML(); |
|
21 |
||
12858
0c6fb706f747
More refactoring in attempt to move away from frontlib
unc0rr
parents:
12857
diff
changeset
|
22 |
Q_INVOKABLE void getPreview(); |
0c6fb706f747
More refactoring in attempt to move away from frontlib
unc0rr
parents:
12857
diff
changeset
|
23 |
Q_INVOKABLE void runQuickGame(); |
0c6fb706f747
More refactoring in attempt to move away from frontlib
unc0rr
parents:
12857
diff
changeset
|
24 |
|
12857 | 25 |
signals: |
26 |
void previewIsRendering(); |
|
27 |
void previewImageChanged(); |
|
28 |
void previewHogCountChanged(int count); |
|
12861 | 29 |
void gameFinished(); |
12857 | 30 |
|
31 |
public slots: |
|
32 |
||
33 |
private: |
|
34 |
QQmlEngine* m_engine; |
|
12861 | 35 |
PreviewImageProvider* m_previewProvider; |
36 |
RunQueue* m_runQueue; |
|
12857 | 37 |
|
38 |
static void guiMessagesCallback(void* context, MessageType mt, const char* msg, uint32_t len); |
|
39 |
||
40 |
private slots: |
|
41 |
void engineMessageHandler(MessageType mt, const QByteArray& msg); |
|
42 |
}; |
|
43 |
||
44 |
#endif // HWENGINE_H |