This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/example/doric/utils/DoricInputBridge.cpp

20 lines
611 B
C++
Raw Permalink Normal View History

2021-05-27 10:56:58 +08:00
#include "DoricInputBridge.h"
#include "shader/DoricInputNode.h"
DoricInputBridge::DoricInputBridge(QObject *parent) : QObject(parent) {}
void DoricInputBridge::onTextChange(QString pointer, QString text) {
QObject *object = (QObject *)(pointer.toULongLong());
DoricInputNode *inputNode = dynamic_cast<DoricInputNode *>(object);
inputNode->onTextChange(text);
}
2021-05-27 14:00:19 +08:00
void DoricInputBridge::onFocusChange(QString pointer, bool hasFocus) {
2021-05-27 10:56:58 +08:00
QObject *object = (QObject *)(pointer.toULongLong());
DoricInputNode *inputNode = dynamic_cast<DoricInputNode *>(object);
2021-05-27 14:00:19 +08:00
inputNode->onFocusChange(hasFocus);
2021-05-27 10:56:58 +08:00
}