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/doric/utils/DoricDialogOnAcceptedBridge.cpp
2021-05-20 18:27:45 +08:00

24 lines
754 B
C++

#include "DoricDialogOnAcceptedBridge.h"
#include "plugin/DoricModalPlugin.h"
#include <QQuickWindow>
DoricDialogOnAcceptedBridge::DoricDialogOnAcceptedBridge(QObject *parent)
: QObject(parent) {}
void DoricDialogOnAcceptedBridge::onClick(QString windowPointer,
QString pluginPointer,
QString callbackId) {
{
QObject *object = (QObject *)(windowPointer.toULongLong());
QQuickWindow *window = dynamic_cast<QQuickWindow *>(object);
window->deleteLater();
}
{
QObject *object = (QObject *)(pluginPointer.toULongLong());
DoricModalPlugin *modalPlugin = dynamic_cast<DoricModalPlugin *>(object);
modalPlugin->onAccept(callbackId);
}
}