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 Q_QUICKTEMPLATES2_EXPORT QQuickDialogButtonBoxPrivate : public QQuickContainerPrivate
25{
26public:
27 Q_DECLARE_PUBLIC(QQuickDialogButtonBox)
28
29 static QQuickDialogButtonBoxPrivate *get(QQuickDialogButtonBox *box)
30 {
31 return box->d_func();
32 }
33
34 void itemImplicitWidthChanged(QQuickItem *item) override;
35 void itemImplicitHeightChanged(QQuickItem *item) override;
36
37 void resizeContent() override;
38
39 void updateLayout();
40
41 qreal getContentWidth() const override;
42 qreal getContentHeight() const override;
43
44 void handleClick();
45
46 static QString buttonText(QPlatformDialogHelper::StandardButton standardButton);
47
48 QQuickAbstractButton *createStandardButton(QPlatformDialogHelper::StandardButton button);
49 void removeStandardButtons();
50
51 void updateLanguage();
52
53 QPlatformDialogHelper::StandardButton standardButton(QQuickAbstractButton *button) const;
54
55 Qt::Alignment alignment;
56 QQuickDialogButtonBox::Position position = QQuickDialogButtonBox::Footer;
57 QPlatformDialogHelper::StandardButtons standardButtons = QPlatformDialogHelper::NoButton;
58 QPlatformDialogHelper::ButtonLayout buttonLayout = QPlatformDialogHelper::UnknownLayout;
59 QQmlComponent *delegate = nullptr;
60};
61
78
79QT_END_NAMESPACE
80
81#endif // QQUICKDIALOGBUTTONBOX_P_P_H
QPlatformDialogHelper::ButtonRole buttonRole
QPlatformDialogHelper::StandardButton standardButton
static QRectF alignedRect(Qt::LayoutDirection direction, Qt::Alignment alignment, const QSizeF &size, const QRectF &rectangle)