1 | /* |
2 | This file is part of the KDE libraries |
3 | SPDX-FileCopyrightText: 2012 David Faure <faure+bluesystems@kde.org> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
6 | */ |
7 | |
8 | #ifndef KMESSAGEBOXDONTASKAGAININTERFACE_H |
9 | #define KMESSAGEBOXDONTASKAGAININTERFACE_H |
10 | |
11 | #include "kmessagebox.h" |
12 | #include <qmetatype.h> |
13 | |
14 | /** |
15 | * @internal |
16 | * Used internally by KMessageBox, implemented by plugin, for dynamic dependency on KConfig. |
17 | */ |
18 | class KMessageBoxDontAskAgainInterface |
19 | { |
20 | public: |
21 | KMessageBoxDontAskAgainInterface() |
22 | { |
23 | } |
24 | virtual ~KMessageBoxDontAskAgainInterface() |
25 | { |
26 | } |
27 | |
28 | virtual bool shouldBeShownTwoActions(const QString &dontShowAgainName, KMessageBox::ButtonCode &result) = 0; |
29 | virtual bool shouldBeShownContinue(const QString &dontShowAgainName) = 0; |
30 | virtual void saveDontShowAgainTwoActions(const QString &dontShowAgainName, KMessageBox::ButtonCode result) = 0; |
31 | virtual void saveDontShowAgainContinue(const QString &dontShowAgainName) = 0; |
32 | virtual void enableAllMessages() = 0; |
33 | virtual void enableMessage(const QString &dontShowAgainName) = 0; |
34 | virtual void setConfig(KConfig *) = 0; |
35 | }; |
36 | |
37 | Q_DECLARE_METATYPE(KMessageBoxDontAskAgainInterface *) |
38 | |
39 | #define KMESSAGEBOXDONTASKAGAIN_PROPERTY "KMessageBoxDontAskAgain" |
40 | |
41 | #endif |
42 | |