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
qquickmessagedialog_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 QQUICKMESSAGEDIALOG_P_H
5#define QQUICKMESSAGEDIALOG_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
19
21
22class Q_QUICKDIALOGS2_EXPORT QQuickMessageDialog : public QQuickAbstractDialog
23{
25
26private:
27 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
28 Q_PROPERTY(QString informativeText READ informativeText WRITE setInformativeText NOTIFY informativeTextChanged FINAL)
29 Q_PROPERTY(QString detailedText READ detailedText WRITE setDetailedText NOTIFY detailedTextChanged FINAL)
30 Q_PROPERTY(QPlatformDialogHelper::StandardButtons buttons READ buttons WRITE setButtons NOTIFY buttonsChanged FINAL)
34
35public:
36 explicit QQuickMessageDialog(QObject *parent = nullptr);
37
38 QString text() const;
39 void setText(const QString &text);
40
41 QString informativeText() const;
42 void setInformativeText(const QString &text);
43
44 QString detailedText() const;
45 void setDetailedText(const QString &text);
46
47 QPlatformDialogHelper::StandardButtons buttons() const;
48 void setButtons(QPlatformDialogHelper::StandardButtons buttons);
49
52 void informativeTextChanged();
53 void detailedTextChanged();
54 void buttonsChanged();
55
56 void buttonClicked(QPlatformDialogHelper::StandardButton button,
57 QPlatformDialogHelper::ButtonRole role);
58
60 void handleClick(QPlatformDialogHelper::StandardButton button,
61 QPlatformDialogHelper::ButtonRole role);
62
63protected:
64 void onCreate(QPlatformDialogHelper *dialog) override;
65 void onShow(QPlatformDialogHelper *dialog) override;
66 int dialogCode() const override;
67
70 QPlatformDialogHelper::ButtonRole m_roleOfLastButtonPressed = QPlatformDialogHelper::NoRole;
71};
72
74
75#endif // QQUICKMESSAGEDIALOG_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]
void textChanged(const QString &newText)
Combined button and popup list for selecting options.
SharedPointerFileDialogOptions m_options
#define QML_NAMED_ELEMENT(NAME)
#define QML_EXTENDED_NAMESPACE(EXTENDED_NAMESPACE)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
#define explicit
QFileDialog dialog(this)
[1]
msgBox setInformativeText("Do you want to save your changes?")
insertRed setText("insert red text")