handle response
This commit is contained in:
12
doric-Qt/example/doric/utils/DoricDraggableBridge.cpp
Normal file
12
doric-Qt/example/doric/utils/DoricDraggableBridge.cpp
Normal 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);
|
||||
}
|
18
doric-Qt/example/doric/utils/DoricDraggableBridge.h
Normal file
18
doric-Qt/example/doric/utils/DoricDraggableBridge.h
Normal 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
|
Reference in New Issue
Block a user