File indexing completed on 2025-02-02 05:43:21

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_ABSTRACTSELECTIONVIEW_HPP
0010 #define KASTEN_ABSTRACTSELECTIONVIEW_HPP
0011 
0012 // lib
0013 #include "kastengui_export.hpp"
0014 // Qt
0015 #include <QObject>
0016 // Std
0017 #include <memory>
0018 
0019 class QWidget;
0020 
0021 namespace Kasten {
0022 
0023 class AbstractModel;
0024 class AbstractModelSelection;
0025 
0026 class KASTENGUI_EXPORT AbstractSelectionView : public QObject
0027 {
0028     Q_OBJECT
0029 
0030 protected:
0031     AbstractSelectionView();
0032 
0033 public:
0034     ~AbstractSelectionView() override;
0035 
0036 public: // API to be implemented
0037     virtual QWidget* widget() const = 0;
0038     virtual void setData(AbstractModel* model, const AbstractModelSelection* selection) = 0;
0039 
0040 private:
0041     const std::unique_ptr<class AbstractSelectionViewPrivate> d_ptr;
0042 };
0043 
0044 }
0045 
0046 #endif