File indexing completed on 2025-02-16 14:32:07
0001 // SPDX-FileCopyrightText: 2020 Simon Persson <simon.persson@mykolab.com> 0002 // 0003 // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 0005 #ifndef MERGEDVFSMODEL_H 0006 #define MERGEDVFSMODEL_H 0007 0008 #include <QAbstractItemModel> 0009 0010 #include "mergedvfs.h" 0011 0012 class MergedVfsModel : public QAbstractItemModel 0013 { 0014 Q_OBJECT 0015 public: 0016 explicit MergedVfsModel(MergedRepository *pRoot, QObject *pParent = nullptr); 0017 ~MergedVfsModel() override; 0018 int columnCount(const QModelIndex &pParent) const override; 0019 QVariant data(const QModelIndex &pIndex, int pRole) const override; 0020 QModelIndex index(int pRow, int pColumn, const QModelIndex &pParent) const override; 0021 QModelIndex parent(const QModelIndex &pChild) const override; 0022 int rowCount(const QModelIndex &pParent) const override; 0023 0024 static const VersionList *versionList(const QModelIndex &pIndex); 0025 static const MergedNode *node(const QModelIndex &pIndex); 0026 0027 protected: 0028 MergedRepository *mRoot; 0029 0030 }; 0031 0032 #endif // MERGEDVFSMODEL_H