File indexing completed on 2022-11-22 15:27:08

0001 /* This file is part of the KDE project
0002    Copyright (C) 2005 Daniel Teske <teske@squorn.de>
0003 
0004    This program is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU General Public
0006    License version 2 as published by the Free Software Foundation.
0007 
0008    This program is distributed in the hope that it will be useful,
0009    but WITHOUT ANY WARRANTY; without even the implied warranty of
0010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0011    General Public License for more details.
0012 
0013    You should have received a copy of the GNU General Public License
0014    along with this program; see the file COPYING.  If not, write to
0015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0016    Boston, MA 02110-1301, USA.
0017 */
0018 
0019 #ifndef BOOKMARKMODEL_BOOKMARKVIEW_H
0020 #define BOOKMARKMODEL_BOOKMARKVIEW_H
0021 
0022 #include <QTreeView>
0023 
0024 #include "kbookmarkmodel_export.h"
0025 
0026 class KBookmark;
0027 
0028 class KBOOKMARKMODEL_EXPORT KBookmarkView : public QTreeView
0029 {
0030     Q_OBJECT
0031 public:
0032     explicit KBookmarkView(QWidget *parent = nullptr);
0033     ~KBookmarkView() override;
0034     virtual KBookmark bookmarkForIndex(const QModelIndex &idx) const = 0;
0035     void loadFoldedState();
0036 
0037 private Q_SLOTS:
0038     void slotExpanded(const QModelIndex &index);
0039     void slotCollapsed(const QModelIndex &index);
0040 
0041 private:
0042     void loadFoldedState(const QModelIndex &parentIndex);
0043     bool m_loadingState;
0044 };
0045 
0046 #endif