qmlfrontend/engine_instance.cpp
changeset 14154 8354b390f1a2
child 14271 1aac8a62be6f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qmlfrontend/engine_instance.cpp	Wed Nov 07 15:59:51 2018 +0100
@@ -0,0 +1,14 @@
+#include "engine_instance.h"
+
+EngineInstance::EngineInstance(QObject *parent)
+    : QObject(parent), m_instance(Engine::start_engine()) {}
+
+EngineInstance::~EngineInstance() { Engine::cleanup(m_instance); }
+
+Engine::PreviewInfo EngineInstance::generatePreview() {
+  Engine::PreviewInfo pinfo;
+
+  Engine::generate_preview(m_instance, &pinfo);
+
+  return pinfo;
+}