add list bind function

This commit is contained in:
王劲鹏
2021-06-29 10:29:36 +08:00
committed by osborn
parent f191910cb6
commit 35b9d67de6
9 changed files with 55 additions and 5 deletions

View File

@@ -1,3 +1,10 @@
#include "DoricListBridge.h"
#include "shader/list/DoricListNode.h"
DoricListBridge::DoricListBridge(QObject *parent) : QObject(parent) {}
void DoricListBridge::bind(QString pointer, QVariant rectangle, int position) {
QObject *object = (QObject *)(pointer.toULongLong());
DoricListNode *listNode = dynamic_cast<DoricListNode *>(object);
listNode->bind(rectangle, position);
}

View File

@@ -10,6 +10,9 @@ class DORIC_EXPORT DoricListBridge : public QObject {
Q_OBJECT
public:
explicit DoricListBridge(QObject *parent = nullptr);
Q_INVOKABLE
void bind(QString pointer, QVariant rectangle, int position);
};
#endif // DORICLISTBRIDGE_H