File indexing completed on 2022-09-20 21:20:20

0001 /*
0002     SPDX-FileCopyrightText: 2003 Ralf Hoelzer <ralf@well.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 #ifndef PRIVACYFUNCTIONS_H
0008 #define PRIVACYFUNCTIONS_H
0009 
0010 #include "privacyaction.h"
0011 
0012 #include <KLocalizedString>
0013 
0014 
0015 /**
0016 @author Ralf Hoelzer
0017 */
0018 
0019 class ClearAllCookiesAction : public PrivacyAction
0020 {
0021    public:
0022       explicit ClearAllCookiesAction(QTreeWidgetItem * parent)
0023          : PrivacyAction(parent, i18n("Cookies"),
0024                          i18n("Clears all stored cookies set by websites")) { }
0025 
0026       bool action() override;
0027       QString configKey() const override { return QStringLiteral("ClearAllCookies"); }
0028 };
0029 
0030 class ClearAllCookiesPoliciesAction : public PrivacyAction
0031 {
0032    public:
0033       explicit ClearAllCookiesPoliciesAction(QTreeWidgetItem * parent)
0034          : PrivacyAction(parent, i18n("Cookie Policies"),
0035                          i18n("Clears the cookie policies for all visited websites")) { }
0036       bool action() override;
0037       QString configKey() const override { return QStringLiteral("ClearAllCookiesPolicies"); }
0038 };
0039 
0040 class ClearSavedClipboardContentsAction : public PrivacyAction
0041 {
0042    public:
0043       explicit ClearSavedClipboardContentsAction(QTreeWidgetItem * parent)
0044          : PrivacyAction(parent, i18n("Saved Clipboard Contents"),
0045                          i18n("Clears the clipboard contents stored by Klipper")) { }
0046       bool action() override;
0047       QString configKey() const override { return QStringLiteral("ClearSavedClipboardContents"); }
0048 };
0049 
0050 class ClearThumbnailsAction : public PrivacyAction
0051 {
0052    public:
0053       explicit ClearThumbnailsAction(QTreeWidgetItem * parent)
0054          : PrivacyAction(parent, i18n("Thumbnail Cache"),
0055                          i18n("Clears all cached thumbnails")) { }
0056       bool action() override;
0057       QString configKey() const override { return QStringLiteral("ClearThumbnails"); }
0058 };
0059 
0060 class ClearRunCommandHistoryAction : public PrivacyAction
0061 {
0062    public:
0063       explicit ClearRunCommandHistoryAction(QTreeWidgetItem * parent)
0064          : PrivacyAction(parent, i18n("Run Command History"),
0065                          i18n("Clears the history of commands run through the Run Command tool on the desktop")) { }
0066       bool action() override;
0067       QString configKey() const override { return QStringLiteral("ClearRunCommandHistory"); }
0068 };
0069 
0070 class ClearFormCompletionAction : public PrivacyAction
0071 {
0072    public:
0073       explicit ClearFormCompletionAction(QTreeWidgetItem * parent)
0074          : PrivacyAction(parent, i18n("Form Completion Entries"),
0075                          i18n("Clears values which were entered into forms on websites")) { }
0076       bool action() override;
0077       QString configKey() const override { return QStringLiteral("ClearFormCompletion"); }
0078 };
0079 
0080 class ClearWebHistoryAction : public PrivacyAction
0081 {
0082    public:
0083       explicit ClearWebHistoryAction(QTreeWidgetItem * parent)
0084          : PrivacyAction(parent, i18n("Web History"),
0085                          i18n("Clears the history of visited websites")) { }
0086       bool action() override;
0087       QString configKey() const override { return QStringLiteral("ClearWebHistory"); }
0088 };
0089 
0090 class ClearWebCacheAction : public PrivacyAction
0091 {
0092    public:
0093       explicit ClearWebCacheAction(QTreeWidgetItem * parent)
0094          : PrivacyAction(parent, i18n("Web Cache"),
0095                          i18n("Clears the temporary cache of websites visited")) { }
0096       bool action() override;
0097       QString configKey() const override { return QStringLiteral("ClearWebCache"); }
0098 };
0099 
0100 class ClearRecentDocumentsAction : public PrivacyAction
0101 {
0102    public:
0103       explicit ClearRecentDocumentsAction(QTreeWidgetItem * parent)
0104          : PrivacyAction(parent, i18n("Recent Documents"),
0105                          i18n("Clears the list of recently used documents from the KDE applications menu")) { }
0106       bool action() override;
0107       QString configKey() const override { return QStringLiteral("ClearRecentDocuments"); }
0108 };
0109 
0110 class ClearFaviconsAction : public PrivacyAction
0111 {
0112    public:
0113       explicit ClearFaviconsAction(QTreeWidgetItem * parent)
0114          : PrivacyAction(parent, i18n("Favorite Icons"),
0115                          i18n("Clears the FavIcons cached from visited websites")) { }
0116       bool action() override;
0117       QString configKey() const override { return QStringLiteral("ClearFavIcons"); }
0118 };
0119 
0120 class ClearRecentApplicationAction : public PrivacyAction
0121 {
0122    public:
0123       explicit ClearRecentApplicationAction(QTreeWidgetItem * parent)
0124          : PrivacyAction(parent, i18n("Recent Applications"),
0125                          i18n("Clears the list of recently used applications from KDE menu")) { }
0126       bool action() override;
0127       QString configKey() const override { return QStringLiteral("ClearQuickStartMenu"); }
0128 };
0129 
0130 
0131 #endif
0132 
0133 // kate: tab-width 3; indent-mode cstyle; replace-tabs true;