File indexing completed on 2024-06-23 05:49:21

0001 /*
0002     This file is part of the Kasten Framework, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2006-2007, 2009, 2011, 2019 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_DOCUMENTCREATEMANAGER_P_HPP
0010 #define KASTEN_DOCUMENTCREATEMANAGER_P_HPP
0011 
0012 // lib
0013 #include "documentcreatemanager.hpp"
0014 
0015 namespace Kasten {
0016 
0017 class DocumentCreateManagerPrivate
0018 {
0019 public:
0020     explicit DocumentCreateManagerPrivate(DocumentManager* manager);
0021     DocumentCreateManagerPrivate(const DocumentCreateManagerPrivate&) = delete;
0022 
0023     ~DocumentCreateManagerPrivate();
0024 
0025 public:
0026     DocumentCreateManagerPrivate& operator=(const DocumentCreateManagerPrivate&) = delete;
0027 
0028 public:
0029     bool canCreateNewFromData(const QMimeData* mimeData) const;
0030 
0031 public:
0032     void createNew() const;
0033     void createNewFromData(const QMimeData* mimeData, bool setModified) const;
0034 
0035 public:
0036     void setDocumentFactory(AbstractDocumentFactory* factory);
0037 
0038 private:
0039     // unless there is a singleton
0040     DocumentManager* mManager;
0041 
0042     // temporary hack: hard coded factory for byte arrays
0043     AbstractDocumentFactory* mFactory = nullptr;
0044 };
0045 
0046 }
0047 
0048 #endif