File indexing completed on 2024-06-23 05:49:19
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_ABSTRACTTOOL_HPP 0010 #define KASTEN_ABSTRACTTOOL_HPP 0011 0012 // lib 0013 #include "kastencore_export.hpp" 0014 // Qt 0015 #include <QObject> 0016 // Std 0017 #include <memory> 0018 0019 class QString; 0020 0021 namespace Kasten { 0022 0023 class AbstractModel; 0024 0025 // TODO: what is the difference to a plain dependent model? 0026 // 0027 class KASTENCORE_EXPORT AbstractTool : public QObject 0028 { 0029 Q_OBJECT 0030 0031 protected: 0032 AbstractTool(); 0033 0034 public: 0035 ~AbstractTool() override; 0036 0037 public: // API to be implemented 0038 // virtual AbstractModel* targetModel() const = 0; 0039 virtual QString title() const = 0; 0040 0041 virtual void setTargetModel(AbstractModel* model) = 0; 0042 0043 Q_SIGNALS: 0044 void titleChanged(const QString& newTitle); 0045 0046 private: 0047 const std::unique_ptr<class AbstractToolPrivate> d_ptr; 0048 }; 0049 0050 } 0051 0052 #endif