File:
src/gui/kernel/qplatformdialoghelper.h
Checker name:
cppcoreguidelines-special-member-functions
Review status:
unreviewed
static const int *buttonLayout(Qt::Orientation orientation = Qt::Horizontal, ButtonLayout policy = UnknownLayout);
1
// Copyright (C) 2018 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
5
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is part of the QPA API and is not meant to be used
12
// in applications. Usage of this API may make your code
13
// source and binary incompatible with future versions of Qt.
14
//
15
16
17
18
19
20
21
22
23
24
25
Q_MOC_INCLUDE(<QFont>)
26
Q_MOC_INCLUDE(<QColor>)
27
28
QT_BEGIN_NAMESPACE
29
30
31
class QString;
32
class QColor;
33
class QFont;
34
class QWindow;
35
class QVariant;
36
class QUrl;
37
class QColorDialogOptionsPrivate;
38
class QFontDialogOptionsPrivate;
39
class QFileDialogOptionsPrivate;
40
class QMessageDialogOptionsPrivate;
41
42
43
44
class Q_GUI_EXPORT QPlatformDialogHelper : public QObject
45
{
46
Q_OBJECT
47
public:
48
enum StyleHint {
49
DialogIsQtWindow
50
};
51
enum DialogCode { Rejected, Accepted };
52
53
enum StandardButton {
54
// keep this in sync with QDialogButtonBox::StandardButton and QMessageBox::StandardButton
55
NoButton = 0x00000000,
56
Ok = 0x00000400,
57
Save = 0x00000800,
58
SaveAll = 0x00001000,
59
Open = 0x00002000,
60
Yes = 0x00004000,
61
YesToAll = 0x00008000,
62
No = 0x00010000,
63
NoToAll = 0x00020000,
64
Abort = 0x00040000,
65
Retry = 0x00080000,
66
Ignore = 0x00100000,
67
Close = 0x00200000,
68
Cancel = 0x00400000,
69
Discard = 0x00800000,
70
Help = 0x01000000,
71
Apply = 0x02000000,
72
Reset = 0x04000000,
73
RestoreDefaults = 0x08000000,
74
75
76
FirstButton = Ok, // internal
77
LastButton = RestoreDefaults, // internal
78
LowestBit = 10, // internal: log2(FirstButton)
79
HighestBit = 27 // internal: log2(LastButton)
80
};
81
82
Q_DECLARE_FLAGS(StandardButtons, StandardButton)
83
Q_FLAG(StandardButtons)
84
85
enum ButtonRole {
86
// keep this in sync with QDialogButtonBox::ButtonRole and QMessageBox::ButtonRole
87
// TODO Qt 6: make the enum copies explicit, and make InvalidRole == 0 so that
88
// AcceptRole can be or'ed with flags, and EOL can be the same as InvalidRole (null-termination)
89
InvalidRole = -1,
90
AcceptRole,
91
RejectRole,
92
DestructiveRole,
93
ActionRole,
94
HelpRole,
95
YesRole,
96
NoRole,
97
ResetRole,
98
ApplyRole,
99
100
NRoles,
101
102
RoleMask = 0x0FFFFFFF,
103
AlternateRole = 0x10000000,
104
Stretch = 0x20000000,
105
Reverse = 0x40000000,
106
EOL = InvalidRole
107
};
108
Q_ENUM(ButtonRole)
109
110
enum ButtonLayout {
111
// keep this in sync with QDialogButtonBox::ButtonLayout
112
UnknownLayout = -1,
113
WinLayout,
114
MacLayout,
115
KdeLayout,
116
GnomeLayout,
117
AndroidLayout
118
};
119
Q_ENUM(ButtonLayout)