File indexing completed on 2024-05-05 05:00:10
0001 /* 0002 kcmhistory.h 0003 SPDX-FileCopyrightText: 2002 Stephan Binner <binner@kde.org> 0004 0005 based on kcmtaskbar.h 0006 SPDX-FileCopyrightText: 2000 Kurt Granroth <granroth@kde.org> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 #ifndef __kcmhistory_h__ 0011 #define __kcmhistory_h__ 0012 0013 #include <KCModule> 0014 #include "ui_history_dlg.h" 0015 0016 class KonqHistoryManager; 0017 class KonqHistorySettings; 0018 0019 class KonqSidebarHistoryDlg : public QWidget, public Ui::KonqSidebarHistoryDlg 0020 { 0021 public: 0022 KonqSidebarHistoryDlg(QWidget *parent) : QWidget(parent) 0023 { 0024 setupUi(this); 0025 layout()->setContentsMargins(0, 0, 0, 0); 0026 } 0027 }; 0028 0029 class HistorySidebarConfig : public KCModule 0030 { 0031 Q_OBJECT 0032 0033 public: 0034 explicit HistorySidebarConfig(QObject *parent = nullptr, const KPluginMetaData& md={}, const QVariantList &list = {}); 0035 0036 void load() override; 0037 void save() override; 0038 void defaults() override; 0039 0040 #if QT_VERSION_MAJOR < 6 0041 void setNeedSave(bool needs){emit changed(needs);} 0042 #endif 0043 0044 private Q_SLOTS: 0045 void configChanged(); 0046 0047 void slotGetFontNewer(); 0048 void slotGetFontOlder(); 0049 0050 void slotExpireChanged(); 0051 void slotNewerChanged(int); 0052 void slotOlderChanged(int); 0053 0054 void slotClearHistory(); 0055 0056 private: 0057 QFont m_fontNewer; 0058 QFont m_fontOlder; 0059 0060 KonqSidebarHistoryDlg *dialog; 0061 KonqHistorySettings *m_settings; 0062 KonqHistoryManager *mgr; 0063 }; 0064 0065 #endif