score
Home
Classes
Namespaces
Files
Remove.hpp
1
#pragma once
2
#include <Device/Node/DeviceNode.hpp>
3
4
#include <Explorer/Commands/DeviceExplorerCommandFactory.hpp>
5
6
#include <score/command/Command.hpp>
7
#include <score/model/path/Path.hpp>
8
9
struct
DataStreamInput
;
10
struct
DataStreamOutput
;
11
12
namespace
Explorer
13
{
14
class
DeviceDocumentPlugin;
15
namespace
Command
16
{
17
// TODO split this command.
18
class
Remove
final :
public
score::Command
19
{
20
SCORE_COMMAND_DECL(
21
DeviceExplorerCommandFactoryName(),
Remove
,
"Remove an Explorer node"
)
22
public
:
23
// For addresses
24
Remove
(
const
DeviceDocumentPlugin& devplug,
Device::NodePath
&& path);
25
26
// For devices
27
Remove
(
const
DeviceDocumentPlugin& devplug,
const
Device::Node
& node);
28
29
~
Remove
();
30
31
void
undo(
const
score::DocumentContext
& ctx)
const override
;
32
void
redo(
const
score::DocumentContext
& ctx)
const override
;
33
34
protected
:
35
void
serializeImpl(
DataStreamInput
&)
const override
;
36
void
deserializeImpl(
DataStreamOutput
&)
override
;
37
38
protected
:
39
bool
m_device{};
40
score::Command
* m_cmd{};
41
};
42
}
43
}
Explorer::Command::Remove
Definition:
Remove.hpp:19
TreeNode< DeviceExplorerNode >
TreePath
Path in a tree of QAbstractItemModel objects.
Definition:
TreePath.hpp:34
score::Command
The Command class.
Definition:
Command.hpp:34
DataStreamInput
Definition:
DataStreamHelpers.hpp:99
DataStreamOutput
Definition:
DataStreamHelpers.hpp:103
score::DocumentContext
Definition:
DocumentContext.hpp:18