2 #include <score/tools/Version.hpp>
4 #include <core/document/DocumentBuilder.hpp>
6 #include <ossia/detail/json_fwd.hpp>
11 #include <score_lib_base_export.h>
15 class QRecentFilesMenu;
19 struct ApplicationContext;
21 struct RestorableDocument;
30 const std::vector<Document*>& documents()
const {
return m_documents; }
32 std::vector<Document*>& documents() {
return m_documents; }
34 Document* currentDocument()
const {
return m_currentDocument; }
36 void setCurrentDocument(
Document* d) { m_currentDocument = d; }
39 std::vector<Document*> m_documents;
58 auto recentFiles()
const {
return m_recentFiles; }
63 template <
typename... Args>
66 prepareNewDocument(ctx);
67 return setupDocument(ctx, m_builder.newDocument(ctx, std::forward<Args>(args)...));
70 template <
typename... Args>
73 closeVirginDocument(ctx);
74 prepareNewDocument(ctx);
75 return setupDocument(ctx, m_builder.loadDocument(ctx, std::forward<Args>(args)...));
78 template <
typename... Args>
81 prepareNewDocument(ctx);
82 setupDocument(ctx, m_builder.restoreDocument(ctx, std::forward<Args>(args)...));
107 bool preparingNewDocument()
const;
118 E_SIGNAL(SCORE_LIB_BASE_EXPORT, documentChanged, arg_1)
124 static bool updateJson(
127 void saveRecentFilesState();
133 QPointer<QRecentFilesMenu> m_recentFiles{};
135 bool m_preparingNewDocument{};
138 SCORE_LIB_BASE_EXPORT
The id_base_t class.
Definition: Identifier.hpp:57
Methods to set-up documents.
Definition: DocumentBuilder.hpp:27
The Document class is the central part of the software.
Definition: Document.hpp:51
Owns the documents.
Definition: DocumentManager.hpp:49
Represents the version of a plug-in.
Definition: Version.hpp:13
The main display of the application.
Definition: lib/core/view/Window.hpp:41
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: DocumentManager.hpp:28
Specializes ApplicationContext with the QMainWindow.
Definition: GUIApplicationContext.hpp:15