src/documentmanager.h

Sun, 19 Jan 2020 02:54:48 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 19 Jan 2020 02:54:48 +0200
changeset 22
6da867fa5429
parent 21
0133e565e072
child 23
3387a84ddaba
permissions
-rw-r--r--

commit work on GL rendering

#pragma once
#include "libraries.h"
#include "model.h"

class DocumentManager : public QObject
{
	Q_OBJECT
	using ModelPointer = std::unique_ptr<Model>;
public:
    DocumentManager(QObject* parent = nullptr);
	QString newModel();
	Model* findModelByName(const QString& name);
	QString openModel(const QString& path, QTextStream& errorStream);
	QString makeNewModelName();
	void loadDependenciesForModel(const QString& modelName,
		const LibraryManager& libraries,
		QTextStream& errorStream);
private:
	int untitledNameCounter = 0;
	std::map<QString, ModelPointer> openModels;
	void loadDependenciesForModel(const QString& modelName,
		const LibraryManager& libraries,
		QStringList& missing,
		QStringList& processed,
		QTextStream& errorStream);
};

mercurial