File indexing completed on 2024-05-05 05:00:09

0001 /*
0002     SPDX-FileCopyrightText: 2009 David Faure <faure@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef HISTORY_MODULE_H
0008 #define HISTORY_MODULE_H
0009 
0010 #include <konqsidebarplugin.h>
0011 #include "konqhistorysettings.h"
0012 
0013 class QModelIndex;
0014 class KonqHistoryView;
0015 
0016 class KonqSidebarHistoryModule : public KonqSidebarModule
0017 {
0018     Q_OBJECT
0019 public:
0020     KonqSidebarHistoryModule(QWidget *parent, const KConfigGroup &configGroup);
0021     ~KonqSidebarHistoryModule() override;
0022     QWidget *getWidget() override;
0023 
0024 public Q_SLOTS:
0025     void slotCurViewUrlChanged(const QUrl& url) override;
0026 
0027 private Q_SLOTS:
0028     void slotActivated(const QModelIndex &index);
0029     void slotPressed(const QModelIndex &index);
0030     void slotClicked(const QModelIndex &index);
0031     void slotOpenWindow(const QUrl &url);
0032     void slotOpenTab(const QUrl &url);
0033     void reparseConfiguration();
0034 
0035 private:
0036     KonqHistoryView *m_historyView;
0037     Qt::MouseButtons m_lastPressedButtons;
0038     KonqHistorySettings *m_settings;
0039     KonqHistorySettings::Action m_defaultAction;
0040     QUrl m_currentUrl;
0041 };
0042 
0043 #endif // HISTORY_MODULE_H