score
Home
Classes
Namespaces
Files
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
9
namespace
Scenario
10
{
11
class
CommentBlockModel;
12
namespace
Command
13
{
15
class
SetCommentText
final :
public
score::Command
16
{
17
SCORE_COMMAND_DECL(CommandFactoryName(),
SetCommentText
,
"Set Text in comment block"
)
18
public
:
19
SetCommentText
(
const
CommentBlockModel
& model, QString newComment);
20
21
private
:
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
28
Path<CommentBlockModel>
m_path;
29
QString m_newComment;
30
QString m_oldComment;
31
};
32
}
33
}
Path
The Path class is a typesafe wrapper around ObjectPath.
Definition:
Path.hpp:52
Scenario::Command::SetCommentText
Changes the comment in a comment block.
Definition:
SetCommentText.hpp:16
Scenario::CommentBlockModel
Definition:
CommentBlockModel.hpp:25
score::Command
The Command class.
Definition:
Command.hpp:34
Scenario
Main plug-in of score.
Definition:
score-plugin-dataflow/Dataflow/PortItem.hpp:14
DataStreamInput
Definition:
DataStreamHelpers.hpp:99
DataStreamOutput
Definition:
DataStreamHelpers.hpp:103
score::DocumentContext
Definition:
DocumentContext.hpp:18