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
2021-07-21 19:03:29 +08:00

20 lines
611 B
C++

#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);
}
void DoricInputBridge::onFocusChange(QString pointer, bool hasFocus) {
QObject *object = (QObject *)(pointer.toULongLong());
DoricInputNode *inputNode = dynamic_cast<DoricInputNode *>(object);
inputNode->onFocusChange(hasFocus);
}