Loading...
Searching...
No Matches
DocumentBackupManager.hpp
1#pragma once
2#include <QByteArray>
3#include <QObject>
4#include <QTemporaryFile>
5
6namespace score
7{
8class CommandBackupFile;
9class Document;
10struct RestorableDocument;
11
35class DocumentBackupManager final : public QObject
36{
37public:
41 explicit DocumentBackupManager(const QByteArray& data, Document& doc);
42
46
48
49 void saveModelData(const QByteArray&);
50
51 void updateBackupData();
52
53private:
54 QTemporaryFile& crashDataFile();
55 CommandBackupFile& crashCommandFile();
56
57 score::Document& m_doc;
58 QTemporaryFile m_modelFile;
59 CommandBackupFile* m_commandFile{};
60};
61}
Abstraction over the backup of commands.
Definition CommandBackupFile.hpp:34
Handles document backup to allow restoring if there is a crash.
Definition DocumentBackupManager.hpp:36
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
Definition DocumentBackups.hpp:14