Qt 6.x
The Qt SDK
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
23{
24 Q_DECLARE_PUBLIC(QDialogButtonBox)
25
26public:
27 enum class RemoveRule {
28 KeepConnections,
29 Disconnect,
30 };
31 enum class LayoutRule {
32 DoLayout,
33 SkipLayout,
34 };
35 enum class AddRule {
36 Connect,
37 SkipConnect,
38 };
39
41
45
49 bool center;
50 bool byPassEventFilter = false;
51
52 void createStandardButtons(QDialogButtonBox::StandardButtons buttons);
53
54 void removeButton(QAbstractButton *button, RemoveRule rule);
55 void layoutButtons();
56 void initLayout();
57 void resetLayout();
59 LayoutRule layoutRule = LayoutRule::DoLayout);
61 LayoutRule layoutRule = LayoutRule::DoLayout,
62 AddRule addRule = AddRule::Connect);
63 void handleButtonDestroyed();
64 void handleButtonClicked();
65 bool handleButtonShowAndHide(QAbstractButton *button, QEvent *event);
66 void addButtonsToLayout(const QList<QAbstractButton *> &buttonList, bool reverse);
67 void ensureFirstAcceptIsDefault();
68 void retranslateStrings();
69 void disconnectAll();
70 QList<QAbstractButton *> allButtons() const;
71 QList<QAbstractButton *> visibleButtons() const;
73};
74
76
77#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
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
\inmodule QtCore
Definition qhash.h:818
Definition qlist.h:74
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:97
DBusConnection const char * rule
struct _cl_event * event
#define Q_AUTOTEST_EXPORT