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;
73SCORE_COMMAND_DECL_T(ChangeElementColor<IntervalModel>)
74SCORE_COMMAND_DECL_T(ChangeElementColor<EventModel>)
75SCORE_COMMAND_DECL_T(ChangeElementColor<TimeSyncModel>)
76SCORE_COMMAND_DECL_T(ChangeElementColor<StateModel>)
77SCORE_COMMAND_DECL_T(ChangeElementColor<Process::ProcessModel>)
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition ChangeElementColor.hpp:15
The Command class.
Definition Command.hpp:34
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition DataStreamHelpers.hpp:103
A reference to a color. Used for skinning.
Definition ColorReference.hpp:21
Definition DocumentContext.hpp:18