author | unC0Rr |
Tue, 04 Feb 2025 17:31:55 +0100 | |
branch | qmlrenderer |
changeset 16116 | 8da5a118120b |
parent 14392 | 90bd2c331703 |
permissions | -rw-r--r-- |
14392
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
1 |
#ifndef PREVIEW_ACCEPTOR_H |
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
2 |
#define PREVIEW_ACCEPTOR_H |
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
3 |
|
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
4 |
#include <QObject> |
16116 | 5 |
#include <QtQmlIntegration> |
14392
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
6 |
|
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
7 |
class QQmlEngine; |
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
8 |
class PreviewImageProvider; |
16116 | 9 |
class QJSEngine; |
14392
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
10 |
|
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
11 |
class PreviewAcceptor : public QObject { |
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
12 |
Q_OBJECT |
16116 | 13 |
|
14 |
QML_ELEMENT |
|
15 |
QML_SINGLETON |
|
16 |
||
14392
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
17 |
public: |
16116 | 18 |
static PreviewAcceptor *create(QQmlEngine *engine, QJSEngine *jsEngine); |
14392
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
19 |
explicit PreviewAcceptor(QQmlEngine *engine, QObject *parent = nullptr); |
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
20 |
|
16116 | 21 |
public Q_SLOTS: |
14392
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
22 |
void setImage(const QImage &preview); |
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
23 |
|
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
24 |
private: |
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
25 |
PreviewImageProvider *m_previewProvider; |
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
26 |
}; |
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
27 |
|
90bd2c331703
Add possibility to instantiate HWEngine objects from QML, reorganize work with preview
unC0Rr
parents:
diff
changeset
|
28 |
#endif // PREVIEW_ACCEPTOR_H |