File indexing completed on 2024-04-28 03:59:07
0001 /* 0002 This file is part of the KDE libraries 0003 SPDX-FileCopyrightText: 2012 David Faure <faure+bluesystems@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 0008 #ifndef KMESSAGEBOXDONTASKAGAININTERFACE_H 0009 #define KMESSAGEBOXDONTASKAGAININTERFACE_H 0010 0011 #include "kmessagebox.h" 0012 #include <qmetatype.h> 0013 0014 /** 0015 * @internal 0016 * Used internally by KMessageBox, implemented by plugin, for dynamic dependency on KConfig. 0017 */ 0018 class KMessageBoxDontAskAgainInterface 0019 { 0020 public: 0021 KMessageBoxDontAskAgainInterface() 0022 { 0023 } 0024 virtual ~KMessageBoxDontAskAgainInterface() 0025 { 0026 } 0027 0028 virtual bool shouldBeShownTwoActions(const QString &dontShowAgainName, KMessageBox::ButtonCode &result) = 0; 0029 virtual bool shouldBeShownContinue(const QString &dontShowAgainName) = 0; 0030 virtual void saveDontShowAgainTwoActions(const QString &dontShowAgainName, KMessageBox::ButtonCode result) = 0; 0031 virtual void saveDontShowAgainContinue(const QString &dontShowAgainName) = 0; 0032 virtual void enableAllMessages() = 0; 0033 virtual void enableMessage(const QString &dontShowAgainName) = 0; 0034 virtual void setConfig(KConfig *) = 0; 0035 }; 0036 0037 Q_DECLARE_METATYPE(KMessageBoxDontAskAgainInterface *) 0038 0039 #define KMESSAGEBOXDONTASKAGAIN_PROPERTY "KMessageBoxDontAskAgain" 0040 0041 #endif