Loading...
Searching...
No Matches
SetCommentText.hpp
1#pragma once
2
3#include <Scenario/Commands/ScenarioCommandFactory.hpp>
4
5#include <score/command/Command.hpp>
6#include <score/model/Identifier.hpp>
7#include <score/model/path/Path.hpp>
8
9namespace Scenario
10{
11class CommentBlockModel;
12namespace Command
13{
15class SetCommentText final : public score::Command
16{
17 SCORE_COMMAND_DECL(CommandFactoryName(), SetCommentText, "Set Text in comment block")
18public:
19 SetCommentText(const CommentBlockModel& model, QString newComment);
20
21private:
22 void undo(const score::DocumentContext& ctx) const override;
23 void redo(const score::DocumentContext& ctx) const override;
24
25 void serializeImpl(DataStreamInput&) const override;
26 void deserializeImpl(DataStreamOutput&) override;
27
29 QString m_newComment;
30 QString m_oldComment;
31};
32}
33}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Changes the comment in a comment block.
Definition SetCommentText.hpp:16
Definition CommentBlockModel.hpp:25
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 DocumentContext.hpp:18