author | unc0rr |
Sat, 27 Sep 2014 12:49:08 +0400 | |
branch | qmlfrontend |
changeset 10424 | 4be6cd55f1cf |
parent 10420 | 02c573d19224 |
child 10426 | 727a154cf784 |
permissions | -rw-r--r-- |
10402 | 1 |
#ifndef HWENGINE_H |
2 |
#define HWENGINE_H |
|
3 |
||
4 |
#include <QObject> |
|
10416 | 5 |
#include <QByteArray> |
6 |
#include <QVector> |
|
10420 | 7 |
#include <QPixmap> |
10416 | 8 |
|
9 |
#include "flib.h" |
|
10402 | 10 |
|
10420 | 11 |
class QQmlEngine; |
12 |
||
10402 | 13 |
class HWEngine : public QObject |
14 |
{ |
|
15 |
Q_OBJECT |
|
16 |
public: |
|
10420 | 17 |
explicit HWEngine(QQmlEngine * engine, QObject *parent = 0); |
10402 | 18 |
~HWEngine(); |
19 |
||
20 |
static void exposeToQML(); |
|
21 |
Q_INVOKABLE void run(); |
|
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
22 |
Q_INVOKABLE QString currentSeed(); |
10402 | 23 |
|
24 |
signals: |
|
10420 | 25 |
void previewImageChanged(); |
10402 | 26 |
|
27 |
public slots: |
|
10416 | 28 |
|
29 |
private: |
|
30 |
QList<QByteArray> m_argsList; |
|
10418
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10416
diff
changeset
|
31 |
QVector<const char *> m_args; |
10420 | 32 |
QQmlEngine * m_engine; |
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
33 |
QString m_seed; |
10416 | 34 |
|
10420 | 35 |
static void engineMessageCallback(void *context, const char * msg, quint32 len); |
10416 | 36 |
void sendIPC(const QByteArray &b); |
10420 | 37 |
|
38 |
private slots: |
|
39 |
void engineMessageHandler(const QByteArray &msg); |
|
10402 | 40 |
}; |
41 |
||
42 |
#endif // HWENGINE_H |
|
43 |