File indexing completed on 2024-09-22 05:16:04

0001 /*
0002     This file is part of the Kasten Framework, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2008 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_VERSIONVIEW_HPP
0010 #define KASTEN_VERSIONVIEW_HPP
0011 
0012 // Qt
0013 #include <QWidget>
0014 
0015 class QTreeView;
0016 
0017 namespace Kasten {
0018 
0019 class VersionTableModel;
0020 class VersionViewTool;
0021 class AbstractModel;
0022 
0023 class VersionView : public QWidget
0024 {
0025     Q_OBJECT
0026 
0027 public:
0028     explicit VersionView(VersionViewTool* tool, QWidget* parent = nullptr);
0029     ~VersionView() override;
0030 
0031 public:
0032     VersionViewTool* tool() const;
0033 
0034 public Q_SLOTS:
0035     void setModel(Kasten::AbstractModel* model);
0036 
0037 private:
0038     VersionViewTool* mTool;
0039 
0040     VersionTableModel* mVersionTableModel;
0041 
0042     QTreeView* mVersionTableView;
0043 };
0044 
0045 inline VersionViewTool* VersionView::tool() const { return mTool; }
0046 
0047 }
0048 
0049 #endif