add image render

This commit is contained in:
王劲鹏
2021-04-23 17:56:08 +08:00
committed by osborn
parent 8ae5af13e9
commit 0a29cc2876
12 changed files with 254 additions and 9 deletions

View File

@@ -0,0 +1,20 @@
#include "DoricImageBridge.h"
#include "shader/DoricImageNode.h"
DoricImageBridge::DoricImageBridge(QObject *parent) : QObject(parent) {}
void DoricImageBridge::onNull(QString pointer) {}
void DoricImageBridge::onReady(QString pointer) {
QObject *object = (QObject *)(pointer.toULongLong());
DoricImageNode *imageNode = dynamic_cast<DoricImageNode *>(object);
imageNode->onReady();
}
void DoricImageBridge::onLoading(QString pointer) {}
void DoricImageBridge::onError(QString pointer) {
QObject *object = (QObject *)(pointer.toULongLong());
DoricImageNode *imageNode = dynamic_cast<DoricImageNode *>(object);
imageNode->onError();
}

View File

@@ -0,0 +1,24 @@
#ifndef DORICIMAGEBRIDGE_H
#define DORICIMAGEBRIDGE_H
#include <QObject>
class DoricImageBridge : public QObject {
Q_OBJECT
public:
explicit DoricImageBridge(QObject *parent = nullptr);
Q_INVOKABLE
void onNull(QString pointer);
Q_INVOKABLE
void onReady(QString pointer);
Q_INVOKABLE
void onLoading(QString pointer);
Q_INVOKABLE
void onError(QString pointer);
};
#endif // DORICIMAGEBRIDGE_H