File indexing completed on 2024-05-12 05:35:49
0001 /* 0002 SPDX-FileCopyrightText: 2012-2016 Ivan Cukic <ivan.cukic@kde.org> 0003 SPDX-FileCopyrightText: 2022 Méven Car <meven.car@kdenet.net> 0004 0005 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0006 */ 0007 0008 #pragma once 0009 0010 #include <KCModule> 0011 #include <KPluginFactory> 0012 0013 #include <utils/d_ptr.h> 0014 0015 class KCoreConfigSkeleton; 0016 0017 /** 0018 * RecentFilesKcm 0019 */ 0020 class RecentFilesKcm : public KCModule 0021 { 0022 Q_OBJECT 0023 public: 0024 explicit RecentFilesKcm(QObject *parent, const KPluginMetaData &data); 0025 ~RecentFilesKcm() override; 0026 0027 KCoreConfigSkeleton *pluginConfig(); 0028 0029 public Q_SLOTS: 0030 void defaults() override; 0031 void load() override; 0032 void save() override; 0033 0034 private Q_SLOTS: 0035 void forget(int count, const QString &what); 0036 void forgetLastHour(); 0037 void forgetTwoHours(); 0038 void forgetDay(); 0039 void forgetAll(); 0040 0041 void spinKeepHistoryValueChanged(int value); 0042 void whatToRememberWidgetChanged(bool checked); 0043 0044 Q_SIGNALS: 0045 void blackListModelChanged(bool changed); 0046 void blackListModelDefaulted(bool isDefault); 0047 0048 private: 0049 enum WhatToRemember { 0050 AllApplications = 0, 0051 SpecificApplications = 1, 0052 NoApplications = 2, 0053 }; 0054 0055 D_PTR; 0056 };