17 lines
536 B
C++
17 lines
536 B
C++
#include "AtlasJsEngine.hpp"
|
|
|
|
|
|
AtlasJsEngine::AtlasJsEngine(QObject *parent) : QJSEngine(parent) {
|
|
// instanciate a new Atlas module
|
|
this->moduleAtlas = std::make_unique<AtlasJsModule>(this);
|
|
|
|
// convert it into a javascript object
|
|
const QJSValue jsModuleAtlas = this->newQObject(this->moduleAtlas.get());
|
|
// make it accessible as "atlas" in the javascript code
|
|
this->globalObject().setProperty("atlas", jsModuleAtlas);
|
|
}
|
|
|
|
|
|
vfs::VirtualFileSystem& AtlasJsEngine::getFileSystem() {
|
|
return this->fileSystem;
|
|
}
|