DocumentBuilder.hpp
1 #pragma once
2 #include <score/model/Identifier.hpp>
3 #include <score/serialization/VisitorInterface.hpp>
4 
5 #include <score_lib_base_export.h>
6 
7 class QWidget;
8 namespace score
9 {
10 class Document;
11 class DocumentBackupManager;
12 class DocumentDelegateFactory;
13 class DocumentModel;
14 struct GUIApplicationContext;
15 struct RestorableDocument;
16 
26 class SCORE_LIB_BASE_EXPORT DocumentBuilder
27 {
28 public:
29  explicit DocumentBuilder(QObject* parentPresenter, QWidget* parentView);
30 
31  Document* newDocument(
32  const score::GUIApplicationContext& ctx, const Id<DocumentModel>& id,
34  Document* loadDocument(
35  const score::GUIApplicationContext& ctx, QString filename,
37  Document* loadDocument(
38  const score::GUIApplicationContext& ctx, QString filename, QByteArray data,
39  SerializationIdentifier format, score::DocumentDelegateFactory& doctype);
40  Document* restoreDocument(
43 
44 private:
45  void setBackupManager(Document* doc);
46 
47  QObject* m_parentPresenter{};
48  QWidget* m_parentView{};
49 };
50 }
The id_base_t class.
Definition: Identifier.hpp:57
Methods to set-up documents.
Definition: DocumentBuilder.hpp:27
Used to provide custom document types.
Definition: DocumentDelegateFactory.hpp:26
The Document class is the central part of the software.
Definition: Document.hpp:51
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Specializes ApplicationContext with the QMainWindow.
Definition: GUIApplicationContext.hpp:15
Definition: DocumentBackups.hpp:14