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
qquicklabsplatformmessagedialog_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 QQUICKLABSPLATFORMMESSAGEDIALOG_P_H
6#define QQUICKLABSPLATFORMMESSAGEDIALOG_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
20#include <QtQml/qqml.h>
21
22#if QT_DEPRECATED_SINCE(6, 9)
23
24QT_BEGIN_NAMESPACE
25
26class QQuickLabsPlatformMessageDialog : public QQuickLabsPlatformDialog
27{
28 Q_OBJECT
29 QML_NAMED_ELEMENT(MessageDialog)
30 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
31 Q_PROPERTY(QString informativeText READ informativeText WRITE setInformativeText NOTIFY informativeTextChanged FINAL)
32 Q_PROPERTY(QString detailedText READ detailedText WRITE setDetailedText NOTIFY detailedTextChanged FINAL)
33 Q_PROPERTY(QPlatformDialogHelper::StandardButtons buttons READ buttons WRITE setButtons NOTIFY buttonsChanged FINAL)
34 QML_EXTENDED_NAMESPACE(QPlatformDialogHelper)
35
36public:
37 explicit QQuickLabsPlatformMessageDialog(QObject *parent = nullptr);
38
39 QString text() const;
40 void setText(const QString &text);
41
42 QString informativeText() const;
43 void setInformativeText(const QString &text);
44
45 QString detailedText() const;
46 void setDetailedText(const QString &text);
47
48 QPlatformDialogHelper::StandardButtons buttons() const;
49 void setButtons(QPlatformDialogHelper::StandardButtons buttons);
50
51Q_SIGNALS:
52 void textChanged();
53 void informativeTextChanged();
54 void detailedTextChanged();
55 void buttonsChanged();
56 void clicked(QPlatformDialogHelper::StandardButton button);
57
58 void okClicked();
59 void saveClicked();
60 void saveAllClicked();
61 void openClicked();
62 void yesClicked();
63 void yesToAllClicked();
64 void noClicked();
65 void noToAllClicked();
66 void abortClicked();
67 void retryClicked();
68 void ignoreClicked();
69 void closeClicked();
70 void cancelClicked();
71 void discardClicked();
72 void helpClicked();
73 void applyClicked();
74 void resetClicked();
75 void restoreDefaultsClicked();
76
77protected:
78 void onCreate(QPlatformDialogHelper *dialog) override;
79 void onShow(QPlatformDialogHelper *dialog) override;
80
81private Q_SLOTS:
82 void handleClick(QPlatformDialogHelper::StandardButton button);
83
84private:
85 QSharedPointer<QMessageDialogOptions> m_options;
86};
87
88QT_END_NAMESPACE
89
90#endif // QT_DEPRECATED_SINCE(6, 9)
91
92#endif // QQUICKLABSPLATFORMMESSAGEDIALOG_P_H