File indexing completed on 2024-07-14 03:54:51

0001 /*
0002     SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
0003     SPDX-FileContributor: Stephen Kelly <stephen@kdab.com>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef BREADCRUMBS_WIDGET_H
0009 #define BREADCRUMBS_WIDGET_H
0010 
0011 #include <QItemSelection>
0012 #include <QWidget>
0013 #include <kselectionproxymodel.h>
0014 
0015 #include "klinkitemselectionmodel.h"
0016 
0017 class MultiSelectionModel : public QItemSelectionModel
0018 {
0019     Q_OBJECT
0020 public:
0021     MultiSelectionModel(QAbstractItemModel *model, QList<QItemSelectionModel *> selectionModels, QObject *parent = nullptr);
0022 
0023 public:
0024     void select(const QModelIndex &index, SelectionFlags command) override;
0025     void select(const QItemSelection &selection, SelectionFlags command) override;
0026 
0027 private:
0028     QList<QItemSelectionModel *> m_selectionModels;
0029 };
0030 
0031 class BreadcrumbsWidget : public QWidget
0032 {
0033     Q_OBJECT
0034 public:
0035     BreadcrumbsWidget(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
0036 };
0037 
0038 #endif