1 | // Copyright (C) 2016 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 QERRORMESSAGE_H |
5 | #define QERRORMESSAGE_H |
6 | |
7 | #include <QtWidgets/qtwidgetsglobal.h> |
8 | |
9 | #include <QtWidgets/qdialog.h> |
10 | |
11 | QT_REQUIRE_CONFIG(errormessage); |
12 | |
13 | QT_BEGIN_NAMESPACE |
14 | |
15 | class QErrorMessagePrivate; |
16 | |
17 | class Q_WIDGETS_EXPORT QErrorMessage: public QDialog |
18 | { |
19 | Q_OBJECT |
20 | Q_DECLARE_PRIVATE(QErrorMessage) |
21 | public: |
22 | explicit QErrorMessage(QWidget* parent = nullptr); |
23 | ~QErrorMessage(); |
24 | |
25 | static QErrorMessage * qtHandler(); |
26 | |
27 | public Q_SLOTS: |
28 | void showMessage(const QString &message); |
29 | void showMessage(const QString &message, const QString &type); |
30 | |
31 | protected: |
32 | void done(int) override; |
33 | void changeEvent(QEvent *e) override; |
34 | |
35 | private: |
36 | Q_DISABLE_COPY(QErrorMessage) |
37 | }; |
38 | |
39 | QT_END_NAMESPACE |
40 | |
41 | #endif // QERRORMESSAGE_H |
42 | |