Loading...
Searching...
No Matches
CreateCommentBlock.hpp
1#pragma once
2
3#include <Process/TimeValue.hpp>
4
5#include <Scenario/Commands/ScenarioCommandFactory.hpp>
6
7#include <score/command/Command.hpp>
8#include <score/model/Identifier.hpp>
9#include <score/model/path/Path.hpp>
10#include <score/tools/std/Optional.hpp>
11
12namespace Scenario
13{
14class CommentBlockModel;
15
16namespace Command
17{
19{
20 SCORE_COMMAND_DECL(CommandFactoryName(), CreateCommentBlock, "Create a comment block")
21public:
23 const Scenario::ProcessModel& scenarioPath, TimeVal date, double yPosition);
24
25 void undo(const score::DocumentContext& ctx) const override;
26 void redo(const score::DocumentContext& ctx) const override;
27
28protected:
29 void serializeImpl(DataStreamInput&) const override;
30 void deserializeImpl(DataStreamOutput&) override;
31
32private:
33 Path<ProcessModel> m_path;
34 TimeVal m_date;
35 double m_y{};
36
38};
40{
41 SCORE_COMMAND_DECL(CommandFactoryName(), RemoveCommentBlock, "Remove a comment block")
42public:
45
46 void undo(const score::DocumentContext& ctx) const override;
47 void redo(const score::DocumentContext& ctx) const override;
48
49protected:
50 void serializeImpl(DataStreamInput&) const override;
51 void deserializeImpl(DataStreamOutput&) override;
52
53private:
54 Path<ProcessModel> m_path;
56 QByteArray m_block;
57};
58}
59}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition CreateCommentBlock.hpp:19
Definition CreateCommentBlock.hpp:40
Definition CommentBlockModel.hpp:25
The core hierarchical and temporal process of score.
Definition ScenarioModel.hpp:37
The id_base_t class.
Definition Identifier.hpp:57
The Command class.
Definition Command.hpp:34
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition TimeValue.hpp:21
Definition DocumentContext.hpp:18