add image render
This commit is contained in:
20
doric-Qt/doric/utils/DoricImageBridge.cpp
Normal file
20
doric-Qt/doric/utils/DoricImageBridge.cpp
Normal 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();
|
||||
}
|
24
doric-Qt/doric/utils/DoricImageBridge.h
Normal file
24
doric-Qt/doric/utils/DoricImageBridge.h
Normal 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
|
Reference in New Issue
Block a user