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
qquickmessagedialogimpl_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 QQUICKMESSAGEDIALOGIMPL_P_H
5#define QQUICKMESSAGEDIALOGIMPL_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/qquickdialog_p.h>
19#include <QtQuickTemplates2/private/qquicklabel_p.h>
20#include <QtQuickTemplates2/private/qquickdialogbuttonbox_p.h>
21#include <QtQuickTemplates2/private/qquicktextarea_p.h>
22#include <QtQuickTemplates2/private/qquickbutton_p.h>
23
25
27
31
32class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickMessageDialogImpl : public QQuickDialog
33{
35 Q_PROPERTY(QString text READ text NOTIFY optionsChanged)
36 Q_PROPERTY(QString informativeText READ informativeText NOTIFY optionsChanged)
37 Q_PROPERTY(QString detailedText READ detailedText NOTIFY optionsChanged)
38 Q_PROPERTY(bool showDetailedText READ showDetailedText NOTIFY showDetailedTextChanged)
39 QML_NAMED_ELEMENT(MessageDialogImpl)
42public:
43 explicit QQuickMessageDialogImpl(QObject *parent = nullptr);
44
45 static QQuickMessageDialogImplAttached *qmlAttachedProperties(QObject *object);
46
48 void setOptions(const QSharedPointer<QMessageDialogOptions> &options);
49
50 bool showDetailedText() const;
51 QString text() const;
52 QString informativeText() const;
53 QString detailedText() const;
54
56 void buttonClicked(QPlatformDialogHelper::StandardButton button,
57 QPlatformDialogHelper::ButtonRole role);
58 void showDetailedTextChanged();
59 void optionsChanged();
60
61public Q_SLOTS:
62 void toggleShowDetailedText();
63
65 Q_DISABLE_COPY(QQuickMessageDialogImpl)
66 Q_DECLARE_PRIVATE(QQuickMessageDialogImpl)
67};
68
69class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickMessageDialogImplAttached : public QObject
70{
72 Q_PROPERTY(QQuickDialogButtonBox *buttonBox READ buttonBox WRITE setButtonBox NOTIFY
73 buttonBoxChanged)
74 Q_PROPERTY(QQuickButton *detailedTextButton READ detailedTextButton WRITE setDetailedTextButton
75 NOTIFY detailedTextButtonChanged)
76public:
78
79 QQuickDialogButtonBox *buttonBox() const;
80 void setButtonBox(QQuickDialogButtonBox *buttons);
81
82 QQuickButton *detailedTextButton() const;
83 void setDetailedTextButton(QQuickButton *detailedTextButton);
84
86 void buttonBoxChanged();
87 void detailedTextButtonChanged();
88
91 Q_DECLARE_PRIVATE(QQuickMessageDialogImplAttached)
92};
93
95
96#endif // QQUICKMESSAGEDIALOGIMPL_P_H
\inmodule QtCore
Definition qobject.h:103
The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QString text
QPushButton * button
[2]
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QML_ATTACHED(ATTACHED_TYPE)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
#define explicit