File indexing completed on 2024-04-21 04:58:16
0001 /* This file is part of the KDE project 0002 SPDX-FileCopyrightText: 2009 Pino Toscano <pino@kde.org> 0003 SPDX-FileCopyrightText: 2009 Daivd Faure <faure@kde.org> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef KONQHISTORYVIEW_H 0009 #define KONQHISTORYVIEW_H 0010 0011 #include <konqprivate_export.h> 0012 #include <QWidget> 0013 class QUrl; 0014 class QModelIndex; 0015 class QTreeView; 0016 class QTimer; 0017 class QLineEdit; 0018 class KonqHistoryProxyModel; 0019 class KonqHistoryModel; 0020 class KActionCollection; 0021 0022 /** 0023 * The widget containing the tree view showing the history, 0024 * and the search lineedit on top of it. 0025 * 0026 * This widget is shared between the history dialog and the 0027 * history sidebar module. 0028 */ 0029 class KONQUERORPRIVATE_EXPORT KonqHistoryView : public QWidget 0030 { 0031 Q_OBJECT 0032 0033 public: 0034 explicit KonqHistoryView(QWidget *parent); 0035 0036 KActionCollection *actionCollection() 0037 { 0038 return m_collection; 0039 } 0040 QTreeView *treeView() const; 0041 QLineEdit *lineEdit() const; 0042 QUrl urlForIndex(const QModelIndex &index) const; 0043 0044 Q_SIGNALS: 0045 void openUrlInNewWindow(const QUrl &url); 0046 void openUrlInNewTab(const QUrl &url); 0047 void openUrlInCurrentTab(const QUrl &url); 0048 0049 private Q_SLOTS: 0050 void slotContextMenu(const QPoint &pos); 0051 void slotRemoveEntry(); 0052 void slotClearHistory(); 0053 void slotPreferences(); 0054 void slotSortChange(QAction *action); 0055 void slotFilterTextChanged(const QString &text); 0056 void slotTimerTimeout(); 0057 void slotNewWindow(); 0058 void slotNewTab(); 0059 void slotCurrentTab(); 0060 void slotCopyLinkLocation(); 0061 0062 private: 0063 QTreeView *m_treeView; 0064 KActionCollection *m_collection; 0065 KonqHistoryModel *m_historyModel; 0066 KonqHistoryProxyModel *m_historyProxyModel; 0067 QLineEdit *m_searchLineEdit; 0068 QTimer *m_searchTimer; 0069 }; 0070 0071 #endif /* KONQHISTORYVIEW_H */ 0072