2#include <ossia/editor/scenario/clock.hpp>
4#include <ossia-qt/score/qml_interval.hpp>
5#include <ossia-qt/score/qml_util.hpp>
10#include <readerwriterqueue.h>
18class qml_exec :
public QObject
22 static qml_exec& instance();
23 static qml_exec* get(QObject* obj);
24 void submitCommand(std::function<
void()>);
27 void play(qml_interval* itvl);
29 void pause(qml_interval* itvl);
31 void stop(qml_interval* itvl);
38 void timerEvent(QTimerEvent* event)
override;
40 QPointer<qml_interval> m_cur{};
41 moodycamel::ReaderWriterQueue<std::function<void()>> m_queue;
42 std::optional<int> m_timer;
43 std::chrono::high_resolution_clock::time_point m_cur_t;