Warning, file /office/calligra/gemini/DocumentManager.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2012 Arjen Hiemstra <ahiemstra@heimr.nl> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef DOCUMENTMANAGER_H 0008 #define DOCUMENTMANAGER_H 0009 0010 #include <QObject> 0011 #include <QVariantMap> 0012 0013 #include <KWDocument.h> 0014 0015 class RecentFileManager; 0016 class Settings; 0017 class ProgressProxy; 0018 class KoPart; 0019 class DocumentManager : public QObject 0020 { 0021 Q_OBJECT 0022 public: 0023 KoDocument* document() const; 0024 Q_INVOKABLE QObject* doc() const; 0025 KoPart* part(const QString& type = WORDS_MIME_TYPE); 0026 ProgressProxy* progressProxy() const; 0027 Settings* settingsManager() const; 0028 void setSettingsManager(Settings* newManager); 0029 RecentFileManager* recentFileManager() const; 0030 bool isTemporaryFile() const; 0031 0032 Q_INVOKABLE void setDocAndPart(KoDocument* document, KoPart* part); 0033 0034 public Q_SLOTS: 0035 void newDocument(int width, int height, float resolution); 0036 void newDocument(const QVariantMap& options); 0037 void openDocument(const QString& document, bool import = false); 0038 void closeDocument(); 0039 bool save(); 0040 void saveAs(const QString &filename, const QString &mimetype); 0041 void reload(); 0042 void setTemporaryFile(bool temp); 0043 0044 static DocumentManager* instance(); 0045 0046 Q_SIGNALS: 0047 void documentChanged(); 0048 void aboutToDeleteDocument(); 0049 void documentSaved(); 0050 0051 private: 0052 explicit DocumentManager(QObject *parent = 0); 0053 ~DocumentManager() override; 0054 0055 class Private; 0056 Private * const d; 0057 0058 static DocumentManager *sm_instance; 0059 0060 private Q_SLOTS: 0061 void delayedNewDocument(); 0062 void delayedSaveAs(); 0063 void delayedOpenDocument(); 0064 }; 0065 0066 #endif // DOCUMENTMANAGER_H