File indexing completed on 2024-06-02 06:03:25

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_ABSTRACTTOOLVIEW_HPP
0010 #define KASTEN_ABSTRACTTOOLVIEW_HPP
0011 
0012 // lib
0013 #include "kastengui_export.hpp"
0014 // Qt
0015 #include <QObject>
0016 // Std
0017 #include <memory>
0018 
0019 class QWidget;
0020 class QString;
0021 
0022 namespace Kasten {
0023 
0024 class AbstractTool;
0025 
0026 // TODO: is there a common base for view and document?
0027 class KASTENGUI_EXPORT AbstractToolView : public QObject
0028 {
0029     Q_OBJECT
0030 
0031 protected:
0032     AbstractToolView();
0033 
0034 public:
0035     ~AbstractToolView() override;
0036 
0037 public: // API to be implemented
0038     virtual QWidget* widget() const = 0;
0039     virtual QString title() const = 0;
0040     virtual AbstractTool* tool() const = 0;
0041 
0042 private:
0043     const std::unique_ptr<class AbstractToolViewPrivate> d_ptr;
0044 };
0045 
0046 }
0047 
0048 #endif