Loading...
Searching...
No Matches
score-plugin-js/JS/ApplicationPlugin.hpp
1#pragma once
2#include <score/plugins/application/GUIApplicationPlugin.hpp>
3
4#include <core/application/ApplicationSettings.hpp>
5
6#include <QFileInfo>
7#include <QQmlComponent>
8#include <QQmlContext>
9#include <QQmlEngine>
10
11#include <thread>
12
13namespace ossia::net
14{
15struct network_context;
16using network_context_ptr = std::shared_ptr<network_context>;
17}
18class QQuickWindow;
19namespace JS
20{
22 : public QObject
24{
25public:
27
28 void on_createdDocument(score::Document& doc) override;
29
30 ~ApplicationPlugin() override;
31 void afterStartup() override;
32
33 QQmlEngine m_engine;
34 QQmlEngine m_dummyEngine;
35 QQmlComponent* m_comp{};
36 QQuickWindow* m_window{};
37
38 std::atomic_bool m_processMessages{};
39 std::thread m_asioThread;
40 ossia::net::network_context_ptr m_asioContext;
41};
42}
Definition score-plugin-js/JS/ApplicationPlugin.hpp:24
void afterStartup() override
afterStartup Called after all the documents have been created / loaded
Definition score-plugin-js/JS/ApplicationPlugin.cpp:89
void on_createdDocument(score::Document &doc) override
on_createdDocument Will be called after either on_newDocument or on_loadedDocument was called on ever...
Definition score-plugin-js/JS/ApplicationPlugin.cpp:66
The Document class is the central part of the software.
Definition Document.hpp:51
Used to extend the software with application-wide data.
Definition GUIApplicationPlugin.hpp:89
Specializes ApplicationContext with the QMainWindow.
Definition GUIApplicationContext.hpp:15