Sat, 14 Dec 2019 23:00:01 +0200
fixed build
| 3 | 1 | #pragma once |
| 12 | 2 | #include "libraries.h" |
| 3 | 3 | #include "model.h" |
| 4 | ||
| 5 | 5 | class DocumentManager : public QObject |
| 3 | 6 | { |
| 5 | 7 | Q_OBJECT |
|
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
5
diff
changeset
|
8 | using ModelPointer = std::unique_ptr<Model>; |
| 3 | 9 | public: |
| 5 | 10 | DocumentManager(QObject* parent = nullptr); |
| 3 | 11 | DocumentManager(const DocumentManager&) = delete; |
| 12 | DocumentManager(DocumentManager&&) = default; | |
| 13 | DocumentManager& operator=(const DocumentManager&) = delete; | |
| 14 | DocumentManager& operator=(DocumentManager&&) = default; | |
|
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
5
diff
changeset
|
15 | QString newModel(); |
|
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
5
diff
changeset
|
16 | Model* findModelByName(const QString& name); |
|
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
5
diff
changeset
|
17 | QString openModel(const QString& path, QTextStream& errorStream); |
|
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
5
diff
changeset
|
18 | QString makeNewModelName(); |
| 12 | 19 | void loadDependenciesForModel(const QString& modelName, |
| 20 | const LibraryManager& libraries, | |
| 21 | QTextStream& errorStream); | |
| 3 | 22 | private: |
|
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
5
diff
changeset
|
23 | int untitledNameCounter = 0; |
|
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
5
diff
changeset
|
24 | std::map<QString, ModelPointer> openModels; |
| 12 | 25 | void loadDependenciesForModel(const QString& modelName, |
| 26 | const LibraryManager& libraries, | |
| 27 | QStringList& missing, | |
| 28 | QStringList& processed, | |
| 29 | QTextStream& errorStream); | |
| 3 | 30 | }; |