File indexing completed on 2024-04-28 04:58:24

0001 /*
0002     SPDX-FileCopyrightText: 2019 Raphael Rosch <kde-dev@insaner.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef BOOKMARKS_MODULE_H
0008 #define BOOKMARKS_MODULE_H
0009 
0010 #include <konqsidebarplugin.h>
0011 class QTreeView;
0012 class QStandardItemModel;
0013 class QItemSelection;
0014 
0015 class KonqSideBarBookmarksModule : public KonqSidebarModule
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     KonqSideBarBookmarksModule(QWidget *parent,
0021                             const KConfigGroup &configGroup);
0022     ~KonqSideBarBookmarksModule() override;
0023 
0024     QWidget *getWidget() override;
0025     void handleURL(const QUrl &hand_url) override;
0026     
0027 private slots:
0028     void slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
0029     void customEvent(QEvent *ev) override;
0030 
0031 private:
0032     QTreeView *treeView;
0033     QStandardItemModel *model;
0034     QUrl m_lastURL;
0035     QUrl m_initURL;
0036 };
0037 
0038 #endif