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
qdialogbuttonbox_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 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 QDIALOGBUTTONBOX_P_H
5#define QDIALOGBUTTONBOX_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 <private/qwidget_p.h>
19#include <qdialogbuttonbox.h>
20
22
24{
25 Q_DECLARE_PUBLIC(QDialogButtonBox)
26
27public:
28 enum class RemoveReason {
29 HideEvent,
30 ManualRemove,
31 Destroyed,
32 };
33 enum class LayoutRule {
34 DoLayout,
35 SkipLayout,
36 };
37 enum class AddRule {
38 Connect,
39 SkipConnect,
40 };
41
43
44 QList<QAbstractButton *> buttonLists[QDialogButtonBox::NRoles];
45 QHash<QPushButton *, QDialogButtonBox::StandardButton> standardButtonHash;
46 QHash<QAbstractButton *, QDialogButtonBox::ButtonRole> hiddenButtons;
47
51 std::unique_ptr<QObject> filter;
52 bool center;
53 bool ignoreShowAndHide = false;
54
55 void createStandardButtons(QDialogButtonBox::StandardButtons buttons);
56
57 void removeButton(QAbstractButton *button, RemoveReason reason);
58 void layoutButtons();
59 void initLayout();
60 void resetLayout();
62 LayoutRule layoutRule = LayoutRule::DoLayout);
64 LayoutRule layoutRule = LayoutRule::DoLayout,
65 AddRule addRule = AddRule::Connect);
66 void handleButtonDestroyed();
67 void handleButtonClicked();
68 bool handleButtonShowAndHide(QAbstractButton *button, QEvent *event);
69 void addButtonsToLayout(const QList<QAbstractButton *> &buttonList, bool reverse);
70 void ensureFirstAcceptIsDefault();
71 void retranslateStrings();
72 void disconnectAll();
73 QList<QAbstractButton *> allButtons() const;
74 QList<QAbstractButton *> visibleButtons() const;
76};
77
79
80#endif // QDIALOGBUTTONBOX_P_H
The QAbstractButton class is the abstract base class of button widgets, providing functionality commo...
The QBoxLayout class lines up child widgets horizontally or vertically.
Definition qboxlayout.h:21
std::unique_ptr< QObject > filter
QDialogButtonBox::ButtonRole buttonRole(QAbstractButton *button) const
QHash< QPushButton *, QDialogButtonBox::StandardButton > standardButtonHash
QHash< QAbstractButton *, QDialogButtonBox::ButtonRole > hiddenButtons
QDialogButtonBox::ButtonLayout layoutPolicy
The QDialogButtonBox class is a widget that presents buttons in a layout that is appropriate to the c...
StandardButton
These enums describe flags for standard buttons.
ButtonLayout
This enum describes the layout policy to be used when arranging the buttons contained in the button b...
\inmodule QtCore
Definition qcoreevent.h:45
The QPushButton widget provides a command button.
Definition qpushbutton.h:20
QPushButton * button
[2]
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:98
struct _cl_event * event
#define Q_AUTOTEST_EXPORT