Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qandroidplatformdialoghelpers.h
Go to the documentation of this file.
1// Copyright (C) 2013 BogDan Vatra <bogdan@kde.org>
2// Copyright (C) 2021 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QANDROIDPLATFORMDIALOGHELPERS_H
6#define QANDROIDPLATFORMDIALOGHELPERS_H
7
8#include <jni.h>
9
10#include <QEventLoop>
11#include <QtCore/QJniObject>
12#include <qpa/qplatformdialoghelper.h>
13
15
16class QJniEnvironment;
17
18namespace QtAndroidDialogHelpers {
19
21{
23public:
26
27 void exec() override;
28 bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality,
29 QWindow *parent) override;
30 void hide() override;
31
32public slots:
33 void dialogResult(int buttonID);
34
35private:
36 void addButtons(QSharedPointer<QMessageDialogOptions> opt, ButtonRole role);
37
38private:
39 bool m_shown = false;
40 QEventLoop m_loop;
41 QJniObject m_javaMessageDialog;
42};
43
44
46
47}
48
50
51#endif // QANDROIDPLATFORMDIALOGHELPERS_H
\inmodule QtCore
Definition qeventloop.h:16
\inmodule QtCore
\inmodule QtCore
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
The QPlatformMessageDialogHelper class allows for platform-specific customization of Message dialogs.
\inmodule QtGui
Definition qwindow.h:63
QStyleOptionButton opt
static bool registerNatives()
Combined button and popup list for selecting options.
WindowModality
#define Q_OBJECT
#define slots
view show()
[18] //! [19]