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
qquickdialogbuttonbox_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 QQUICKDIALOGBUTTONBOX_P_P_H
6#define QQUICKDIALOGBUTTONBOX_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/qquickcontainer_p_p.h>
20#include <QtQuickTemplates2/private/qquickdialogbuttonbox_p.h>
21
23
24class QQuickButton;
25
26class Q_QUICKTEMPLATES2_EXPORT QQuickDialogButtonBoxPrivate : public QQuickContainerPrivate
27{
28public:
29 Q_DECLARE_PUBLIC(QQuickDialogButtonBox)
30
31 static QQuickDialogButtonBoxPrivate *get(QQuickDialogButtonBox *box)
32 {
33 return box->d_func();
34 }
35
36 void itemImplicitWidthChanged(QQuickItem *item) override;
37 void itemImplicitHeightChanged(QQuickItem *item) override;
38
39 void resizeContent() override;
40
41 void updateLayout();
42 void updateFocus();
43
44 qreal getContentWidth() const override;
45 qreal getContentHeight() const override;
46
47 int indexOfDefaultStandardButton() const;
48 int indexOfAcceptButton() const;
49 void handleClick();
50
51 static QString buttonText(QPlatformDialogHelper::StandardButton standardButton);
52
53 QQuickAbstractButton *createStandardButton(QPlatformDialogHelper::StandardButton button);
54 void removeStandardButtons();
55
56 void updateLanguage();
57
58 QPlatformDialogHelper::StandardButton standardButton(QQuickAbstractButton *button) const;
59
60 Qt::Alignment alignment;
61 QQuickDialogButtonBox::Position position = QQuickDialogButtonBox::Footer;
62 QPlatformDialogHelper::StandardButtons standardButtons = QPlatformDialogHelper::NoButton;
63 QPlatformDialogHelper::StandardButton defaultStandardButton = QPlatformDialogHelper::NoButton;
64 QPlatformDialogHelper::ButtonLayout buttonLayout = QPlatformDialogHelper::UnknownLayout;
65 QQuickAbstractButton *defaultButton = nullptr;
66 QQmlComponent *delegate = nullptr;
67};
68
85
86QT_END_NAMESPACE
87
88#endif // QQUICKDIALOGBUTTONBOX_P_P_H
QPlatformDialogHelper::ButtonRole buttonRole
QPlatformDialogHelper::StandardButton standardButton
Combined button and popup list for selecting options.
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG(quicktemplates2_container)