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

0001 /*
0002     This file is part of the Kasten Framework, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2006-2009, 2011 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_CREATORCONTROLLER_HPP
0010 #define KASTEN_CREATORCONTROLLER_HPP
0011 
0012 // Kasten gui
0013 #include <Kasten/AbstractXmlGuiController>
0014 
0015 class KXMLGUIClient;
0016 
0017 namespace Kasten {
0018 
0019 class ModelCodecManager;
0020 class AbstractDocumentStrategy;
0021 
0022 class CreatorController : public AbstractXmlGuiController
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     CreatorController(ModelCodecManager* modelCodecManager,
0028                       AbstractDocumentStrategy* documentStrategy,
0029                       KXMLGUIClient* guiClient);
0030     ~CreatorController() override;
0031 
0032 public: // AbstractXmlGuiController API
0033     void setTargetModel(AbstractModel* model) override;
0034 
0035 private Q_SLOTS:
0036     void onNewActionTriggered();
0037     void onNewFromClipboardActionTriggered();
0038     void onNewFromGeneratorActionTriggered();
0039 
0040 private:
0041     ModelCodecManager* mModelCodecManager;
0042     AbstractDocumentStrategy* mDocumentStrategy;
0043 };
0044 
0045 }
0046 
0047 #endif