Loading...
Searching...
No Matches
EventExecution.hpp
1#pragma once
2#include <Process/ExecutionComponent.hpp>
3
4#include <Scenario/Document/Event/EventModel.hpp>
5
6#include <ossia/editor/expression/expression.hpp>
7#include <ossia/editor/scenario/time_event.hpp>
8
9#include <verdigris>
10namespace ossia
11{
12class time_event;
13}
14
15namespace Execution
16{
17class SCORE_PLUGIN_SCENARIO_EXPORT EventComponent final : public Execution::Component
18{
19 W_OBJECT(EventComponent)
20 COMMON_COMPONENT_METADATA("02c41de0-3a8c-44da-ae03-68a0ca26a7d0")
21public:
22 static constexpr bool is_unique = true;
24 const Scenario::EventModel& element, const Execution::Context& ctx,
25 QObject* parent);
26
27 void cleanup();
28
30 ossia::expression_ptr makeExpression() const;
31
33 void onSetup(
34 std::shared_ptr<ossia::time_event> event, ossia::expression_ptr expr,
35 ossia::time_event::offset_behavior b);
36
37 std::shared_ptr<ossia::time_event> OSSIAEvent() const;
38 const Scenario::EventModel* scoreEvent() const { return m_score_event; }
39
40public:
41 void happened() W_SIGNAL(happened);
42
43private:
44 QPointer<const Scenario::EventModel> m_score_event;
45 std::shared_ptr<ossia::time_event> m_ossia_event;
46};
47}
Definition EventExecution.hpp:18
Definition EventModel.hpp:36
A component that has a reference to a specific context object.
Definition lib/score/model/Component.hpp:58
Components used for the execution of a score.
Definition ProcessComponent.cpp:12
Definition ExecutionContext.hpp:76