3 #include <State/Expression.hpp>
5 #include <Scenario/Commands/Interval/SetRigidity.hpp>
6 #include <Scenario/Commands/ScenarioCommandFactory.hpp>
7 #include <Scenario/Document/TimeSync/TimeSyncModel.hpp>
9 #include <score/command/Command.hpp>
10 #include <score/model/path/Path.hpp>
17 template <
typename Scenario_T>
23 return ::CommandFactoryName<Scenario_T>();
25 const CommandKey& key()
const noexcept
override {
return static_key(); }
26 QString description()
const override {
return QObject::tr(
"Remove a trigger"); }
37 : m_path{std::move(timeSyncPath)}
43 auto& tn = m_path.find(ctx);
46 for(
const auto& cmd : m_cmds)
55 auto& tn = m_path.find(ctx);
58 auto scenar = safe_cast<Scenario_T*>(tn.parent());
60 for(
const auto& cstrId : intervalsBeforeTimeSync(*scenar, tn.id()))
62 m_cmds.emplace_back(scenar->interval(cstrId),
true);
63 m_cmds.back().redo(ctx);
71 s << (int32_t)m_cmds.size();
73 for(
const auto& cmd : m_cmds)
84 for(
int i = 0; i < n; i++)
88 m_cmds[i].deserialize(a);
94 mutable std::vector<SetRigidity> m_cmds;
99 #include <Scenario/Process/ScenarioModel.hpp>
102 #include <Scenario/Document/BaseScenario/BaseScenario.hpp>
The Path class is a typesafe wrapper around ObjectPath.
Definition: Path.hpp:52
Definition: RemoveTrigger.hpp:19
The Command class.
Definition: Command.hpp:34
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: DataStreamHelpers.hpp:103
Definition: DocumentContext.hpp:18