| 1 | // Copyright (C) 2017 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QQUICKDIALOG_P_P_H |
| 5 | #define QQUICKDIALOG_P_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtQuickTemplates2/private/qquickdialog_p.h> |
| 19 | #include <QtQuickTemplates2/private/qquickpopup_p_p.h> |
| 20 | #include <QtGui/qpa/qplatformdialoghelper.h> |
| 21 | |
| 22 | QT_BEGIN_NAMESPACE |
| 23 | |
| 24 | class QQuickAbstractButton; |
| 25 | class QQuickDialogButtonBox; |
| 26 | |
| 27 | class Q_QUICKTEMPLATES2_EXPORT QQuickDialogPrivate : public QQuickPopupPrivate |
| 28 | { |
| 29 | public: |
| 30 | Q_DECLARE_PUBLIC(QQuickDialog) |
| 31 | |
| 32 | static QQuickDialogPrivate *get(QQuickDialog *dialog) |
| 33 | { |
| 34 | return dialog->d_func(); |
| 35 | } |
| 36 | |
| 37 | static QPlatformDialogHelper::ButtonRole buttonRole(QQuickAbstractButton *button); |
| 38 | |
| 39 | virtual void handleAccept(); |
| 40 | virtual void handleReject(); |
| 41 | virtual void handleClick(QQuickAbstractButton *button); |
| 42 | |
| 43 | Qt::WindowFlags popupWindowType() const override; |
| 44 | |
| 45 | int result = 0; |
| 46 | QString title; |
| 47 | QQuickDialogButtonBox *buttonBox = nullptr; |
| 48 | QPlatformDialogHelper::StandardButtons standardButtons = QPlatformDialogHelper::NoButton; |
| 49 | }; |
| 50 | |
| 51 | QT_END_NAMESPACE |
| 52 | |
| 53 | #endif // QQUICKDIALOG_P_P_H |
| 54 |
