Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickdialog_p_p.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKDIALOG_P_P_H
6#define QQUICKDIALOG_P_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuickTemplates2/private/qquickdialog_p.h>
20#include <QtQuickTemplates2/private/qquickpopup_p_p.h>
21#include <QtGui/qpa/qplatformdialoghelper.h>
22
23#include <optional>
24
25QT_BEGIN_NAMESPACE
26
27class QQuickAbstractButton;
28class QQuickDialogButtonBox;
29
30class Q_QUICKTEMPLATES2_EXPORT QQuickDialogPrivate : public QQuickPopupPrivate
31{
32public:
33 Q_DECLARE_PUBLIC(QQuickDialog)
34 QQuickDialogPrivate() {
35 windowFlags = Qt::Dialog;
36#if QT_CONFIG(wayland)
37 extendedWindowType = QNativeInterface::Private::QWaylandWindow::Default;
38#endif
39#if QT_CONFIG(xcb)
40 wmWindowType = QNativeInterface::Private::QXcbWindow::Dialog;
41#endif
42 }
43
44 static QQuickDialogPrivate *get(QQuickDialog *dialog)
45 {
46 return dialog->d_func();
47 }
48
49 static QPlatformDialogHelper::ButtonRole buttonRole(QQuickAbstractButton *button);
50
51 virtual void handleAccept();
52 virtual void handleReject();
53 virtual void handleClick(QQuickAbstractButton *button);
54
55 bool prepareEnterTransition() override;
56
57 int result = 0;
58 QQuickDialogButtonBox *buttonBox = nullptr;
59 QPlatformDialogHelper::StandardButtons standardButtons = QPlatformDialogHelper::NoButton;
60 QPlatformDialogHelper::StandardButton defaultStandardButton = QPlatformDialogHelper::NoButton;
61 std::optional<QQuickText::TextFormat> titleFormat;
62 bool titleFormatWarningDisplayed = false;
63};
64
65QT_END_NAMESPACE
66
67#endif // QQUICKDIALOG_P_P_H
Combined button and popup list for selecting options.
QT_REQUIRE_CONFIG(quicktemplates2_container)