add prompt
This commit is contained in:
@@ -34,3 +34,35 @@ void DoricDialogBridge::onRejected(QString windowPointer, QString pluginPointer,
|
||||
modalPlugin->onRejected(callbackId);
|
||||
}
|
||||
}
|
||||
|
||||
void DoricDialogBridge::onAcceptedWithInput(QString windowPointer,
|
||||
QString pluginPointer,
|
||||
QString callbackId, QString input) {
|
||||
{
|
||||
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->onAcceptedWithInput(callbackId, input);
|
||||
}
|
||||
}
|
||||
|
||||
void DoricDialogBridge::onRejectedWithInput(QString windowPointer,
|
||||
QString pluginPointer,
|
||||
QString callbackId, QString input) {
|
||||
{
|
||||
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->onRejectedWithInput(callbackId, input);
|
||||
}
|
||||
}
|
||||
|
@@ -12,9 +12,17 @@ public:
|
||||
void onAccepted(QString windowPointer, QString pluginPointer,
|
||||
QString callbackId);
|
||||
|
||||
Q_INVOKABLE
|
||||
void onAcceptedWithInput(QString windowPointer, QString pluginPointer,
|
||||
QString callbackId, QString input);
|
||||
|
||||
Q_INVOKABLE
|
||||
void onRejected(QString windowPointer, QString pluginPointer,
|
||||
QString callbackId);
|
||||
|
||||
Q_INVOKABLE
|
||||
void onRejectedWithInput(QString windowPointer, QString pluginPointer,
|
||||
QString callbackId, QString input);
|
||||
};
|
||||
|
||||
#endif // DORICDIALOGBRIDGE_H
|
||||
|
Reference in New Issue
Block a user