2 #include <Scenario/Commands/ScenarioCommandFactory.hpp>
4 #include <score/command/Command.hpp>
5 #include <score/model/ColorReference.hpp>
6 #include <score/model/path/Path.hpp>
7 #include <score/model/path/PathSerialization.hpp>
20 return CommandFactoryName();
28 const CommandKey& key()
const noexcept
override {
return static_key(); }
29 QString description()
const override
37 , m_newColor{newColor}
39 m_oldColor = obj.metadata().getColor();
44 auto& obj = m_path.find(ctx);
45 obj.metadata().setColor(m_oldColor);
50 auto& obj = m_path.find(ctx);
51 obj.metadata().setColor(m_newColor);
57 s << m_path << m_oldColor << m_newColor;
62 s >> m_path >> m_oldColor >> m_newColor;
73 SCORE_COMMAND_DECL_T(ChangeElementColor<IntervalModel>)
74 SCORE_COMMAND_DECL_T(ChangeElementColor<EventModel>)
75 SCORE_COMMAND_DECL_T(ChangeElementColor<TimeSyncModel>)
76 SCORE_COMMAND_DECL_T(ChangeElementColor<StateModel>)
77 SCORE_COMMAND_DECL_T(ChangeElementColor<Process::ProcessModel>)
Definition: ChangeElementColor.hpp:15
The Command class.
Definition: Command.hpp:34
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: DataStreamHelpers.hpp:103
A reference to a color. Used for skinning.
Definition: ColorReference.hpp:21
Definition: DocumentContext.hpp:18