1 /* 2 This file is part of the Kasten Framework, made within the KDE community. 3 4 SPDX-FileCopyrightText: 2008 Friedrich W. H. Kossebau <kossebau@kde.org> 5 6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 7 */ 8 9 #include "versionviewtool.hpp" 10 11 // Kasten core 12 #include <Kasten/Versionable> 13 #include <Kasten/AbstractDocument> 14 // KF 15 #include <KLocalizedString> 16 17 namespace Kasten { 18 VersionViewTool()19VersionViewTool::VersionViewTool() 20 { 21 setObjectName(QStringLiteral("Versions")); 22 } 23 24 VersionViewTool::~VersionViewTool() = default; 25 title() const26QString VersionViewTool::title() const { return i18nc("@title:window", "Versions"); } 27 setTargetModel(AbstractModel * model)28void VersionViewTool::setTargetModel(AbstractModel* model) 29 { 30 mModel = model ? model->findBaseModelWithInterface<If::Versionable*>() : nullptr; 31 emit modelChanged(mModel); 32 } 33 34 } 35