MCPcopy Create free account
hub / github.com/OpenMW/openmw / DocumentManager

Method DocumentManager

apps/opencs/model/doc/documentmanager.cpp:17–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#include "document.hpp"
16
17CSMDoc::DocumentManager::DocumentManager(const Files::ConfigurationManager& configuration)
18 : mConfiguration(configuration)
19 , mEncoding(ToUTF8::WINDOWS_1252)
20{
21 std::filesystem::path projectPath = configuration.getUserDataPath() / "projects";
22
23 if (!std::filesystem::is_directory(projectPath))
24 std::filesystem::create_directories(projectPath);
25
26 mLoader.moveToThread(&mLoaderThread);
27 mLoaderThread.start();
28
29 connect(&mLoader, &Loader::documentLoaded, this, &DocumentManager::documentLoaded);
30 connect(&mLoader, &Loader::documentNotLoaded, this, &DocumentManager::documentNotLoaded);
31 connect(this, &DocumentManager::loadRequest, &mLoader, &Loader::loadDocument);
32 connect(&mLoader, &Loader::nextStage, this, &DocumentManager::nextStage);
33 connect(&mLoader, &Loader::nextRecord, this, &DocumentManager::nextRecord);
34 connect(this, &DocumentManager::cancelLoading, &mLoader, &Loader::abortLoading);
35 connect(&mLoader, &Loader::loadMessage, this, &DocumentManager::loadMessage);
36}
37
38CSMDoc::DocumentManager::~DocumentManager()
39{

Callers

nothing calls this directly

Calls 2

getUserDataPathMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected