File indexing completed on 2024-06-16 05:24:55
0001 /* 0002 This file is part of the Okteta Kasten module, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2023 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef KASTEN_PODDISPLAYMODEL_HPP 0010 #define KASTEN_PODDISPLAYMODEL_HPP 0011 0012 // Qt 0013 #include <QIdentityProxyModel> 0014 0015 class QWidget; 0016 0017 namespace Kasten { 0018 0019 class PODDecoderTool; 0020 0021 class PODDisplayModel : public QIdentityProxyModel 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 explicit PODDisplayModel(QWidget* uiWidget, PODDecoderTool* tool, QObject* parent = nullptr); 0027 0028 ~PODDisplayModel() override; 0029 0030 public: // QAbstractItemModel API 0031 QVariant data(const QModelIndex& index, int role) const override; 0032 Qt::ItemFlags flags(const QModelIndex& index) const override; 0033 QMimeData* mimeData(const QModelIndexList& indexes) const override; 0034 QStringList mimeTypes() const override; 0035 0036 private: 0037 QWidget* const m_uiWidget; 0038 PODDecoderTool* const m_tool; 0039 }; 0040 0041 } 0042 0043 #endif