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
qquickdialog_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
4#ifndef QQUICKDIALOG_P_H
5#define QQUICKDIALOG_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 <QtQuickTemplates2/private/qquickabstractbutton_p.h>
19#include <QtQuickTemplates2/private/qquickpopup_p.h>
20#include <QtGui/qpa/qplatformdialoghelper.h>
21
22QT_REQUIRE_CONFIG(quicktemplates2_container);
23
25
27
28class Q_QUICKTEMPLATES2_EXPORT QQuickDialog : public QQuickPopup
29{
31 Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
32 Q_PROPERTY(QQuickItem *header READ header WRITE setHeader NOTIFY headerChanged FINAL)
33 Q_PROPERTY(QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged FINAL)
34 Q_PROPERTY(QPlatformDialogHelper::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons NOTIFY standardButtonsChanged FINAL)
35 // 2.3 (Qt 5.10)
36 Q_PROPERTY(int result READ result WRITE setResult NOTIFY resultChanged FINAL REVISION(2, 3))
38 // 2.5 (Qt 5.12)
39 Q_PROPERTY(qreal implicitHeaderWidth READ implicitHeaderWidth NOTIFY implicitHeaderWidthChanged FINAL REVISION(2, 5))
40 Q_PROPERTY(qreal implicitHeaderHeight READ implicitHeaderHeight NOTIFY implicitHeaderHeightChanged FINAL REVISION(2, 5))
41 Q_PROPERTY(qreal implicitFooterWidth READ implicitFooterWidth NOTIFY implicitFooterWidthChanged FINAL REVISION(2, 5))
42 Q_PROPERTY(qreal implicitFooterHeight READ implicitFooterHeight NOTIFY implicitFooterHeightChanged FINAL REVISION(2, 5))
43 QML_NAMED_ELEMENT(Dialog)
45
46public:
47 explicit QQuickDialog(QObject *parent = nullptr);
48 ~QQuickDialog();
49
50 QString title() const;
51 void setTitle(const QString &title);
52
53 QQuickItem *header() const;
55
56 QQuickItem *footer() const;
57 void setFooter(QQuickItem *footer);
58
59 QPlatformDialogHelper::StandardButtons standardButtons() const;
60 void setStandardButtons(QPlatformDialogHelper::StandardButtons buttons);
61 Q_REVISION(2, 3) Q_INVOKABLE QQuickAbstractButton *standardButton(QPlatformDialogHelper::StandardButton button) const;
62
63 // 2.3 (Qt 5.10)
64 enum StandardCode { Rejected, Accepted };
65 Q_ENUM(StandardCode)
66
67 int result() const;
68 void setResult(int result);
69
70 // 2.5 (Qt 5.12)
71 qreal implicitHeaderWidth() const;
72 qreal implicitHeaderHeight() const;
73
74 qreal implicitFooterWidth() const;
75 qreal implicitFooterHeight() const;
76
77public Q_SLOTS:
78 virtual void accept();
79 virtual void reject();
80 virtual void done(int result);
81
83 void accepted();
84 void rejected();
89 // 2.3 (Qt 5.10)
90 Q_REVISION(2, 3) void applied();
91 Q_REVISION(2, 3) void reset();
92 Q_REVISION(2, 3) void discarded();
93 Q_REVISION(2, 3) void helpRequested();
94 Q_REVISION(2, 3) void resultChanged();
95 // 2.5 (Qt 5.12)
96 void implicitHeaderWidthChanged();
97 void implicitHeaderHeightChanged();
98 void implicitFooterWidthChanged();
99 void implicitFooterHeightChanged();
100
101protected:
103
104#if QT_CONFIG(accessibility)
105 QAccessible::Role accessibleRole() const override;
106 void accessibilityActiveChanged(bool active) override;
107#endif
108
109private:
110 Q_DISABLE_COPY(QQuickDialog)
111 Q_DECLARE_PRIVATE(QQuickDialog)
112};
113
115
116#endif // QQUICKDIALOG_P_H
\inmodule QtCore
Definition qobject.h:103
The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
void accepted()
void footerChanged()
void titleChanged()
void standardButtonsChanged()
void headerChanged()
void rejected()
Q_REVISION(2, 3) void applied()
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QPushButton * button
[2]
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
static QString header(const QString &name)
GLboolean reset
GLuint64EXT * result
[6]
#define QML_NAMED_ELEMENT(NAME)
#define QML_EXTENDED_NAMESPACE(EXTENDED_NAMESPACE)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QT_REQUIRE_CONFIG(feature)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_REVISION(...)
#define Q_INVOKABLE
#define Q_SLOTS
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
#define explicit
QString title
[35]
msgBox setStandardButtons(QMessageBox::Save|QMessageBox::Discard|QMessageBox::Cancel)
g setTitle("&User information")
[0]
textPart setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"text\""))