handle response

This commit is contained in:
王劲鹏
2021-06-02 11:26:11 +08:00
committed by osborn
parent a0a6ebf50d
commit 80301837c3
8 changed files with 52 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
#include "DoricDraggableBridge.h"
#include "shader/DoricDraggableNode.h"
DoricDraggableBridge::DoricDraggableBridge(QObject *parent) : QObject(parent) {}
void DoricDraggableBridge::onDrag(QString pointer, double x, double y) {
QObject *object = (QObject *)(pointer.toULongLong());
DoricDraggableNode *draggableNode =
dynamic_cast<DoricDraggableNode *>(object);
draggableNode->onDrag(x, y);
}

View File

@@ -0,0 +1,18 @@
#ifndef DORICDRAGGABLEBRIDGE_H
#define DORICDRAGGABLEBRIDGE_H
#include <QObject>
#include <QVariant>
#include "DoricExport.h"
class DORIC_EXPORT DoricDraggableBridge : public QObject {
Q_OBJECT
public:
explicit DoricDraggableBridge(QObject *parent = nullptr);
Q_INVOKABLE
void onDrag(QString pointer, double x, double y);
};
#endif // DORICDRAGGABLEBRIDGE_H