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

source code of qtdeclarative/src/labs/platform/qquicklabsplatformmessagedialog_p.h