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

24 lines
754 B
C++
Raw Normal View History

2021-04-22 11:43:48 +08:00
#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);
}
}