File indexing completed on 2024-06-23 05:49:17
0001 /* 0002 This file is part of the Kasten Framework, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2006-2008, 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_LOADERCONTROLLER_HPP 0010 #define KASTEN_LOADERCONTROLLER_HPP 0011 0012 // Kasten gui 0013 #include <Kasten/AbstractXmlGuiController> 0014 // Qt 0015 #include <QList> 0016 #include <QUrl> 0017 0018 class KRecentFilesAction; 0019 class KXMLGUIClient; 0020 class QUrl; 0021 0022 namespace Kasten { 0023 0024 class AbstractDocumentStrategy; 0025 0026 class LoaderController : public AbstractXmlGuiController 0027 { 0028 Q_OBJECT 0029 0030 public: 0031 LoaderController(AbstractDocumentStrategy* documentStrategy, 0032 KXMLGUIClient* guiClient); 0033 ~LoaderController() override; 0034 0035 public: // AbstractXmlGuiController API 0036 void setTargetModel(AbstractModel* model) override; 0037 0038 private Q_SLOTS: 0039 void load(); 0040 void loadRecent(const QUrl& url); 0041 void loadUrls(const QList<QUrl>& urls); 0042 0043 void onUrlUsed(const QUrl& url); 0044 0045 private: 0046 AbstractDocumentStrategy* mDocumentStrategy; 0047 0048 KRecentFilesAction* mOpenRecentAction; 0049 }; 0050 0051 } 0052 0053 #endif