score
Home
Classes
Namespaces
Files
Loading...
Searching...
No Matches
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
#include <score_plugin_deviceexplorer_export.h>
10
11
struct
DataStreamInput
;
12
struct
DataStreamOutput
;
13
14
namespace
Explorer
15
{
16
class
DeviceDocumentPlugin;
17
namespace
Command
18
{
19
// TODO split this command.
20
class
SCORE_PLUGIN_DEVICEEXPLORER_EXPORT
Remove
final :
public
score::Command
21
{
22
SCORE_COMMAND_DECL(
23
DeviceExplorerCommandFactoryName(),
Remove
,
"Remove an Explorer node"
)
24
public
:
25
// For addresses
26
Remove
(
const
DeviceDocumentPlugin& devplug,
Device::NodePath
&& path);
27
28
// For devices
29
Remove
(
const
DeviceDocumentPlugin& devplug,
const
Device::Node
& node);
30
31
~Remove
();
32
33
void
undo(
const
score::DocumentContext
& ctx)
const override
;
34
void
redo(
const
score::DocumentContext
& ctx)
const override
;
35
36
protected
:
37
void
serializeImpl(
DataStreamInput
&)
const override
;
38
void
deserializeImpl(
DataStreamOutput
&)
override
;
39
40
protected
:
41
bool
m_device{};
42
score::Command
* m_cmd{};
43
};
44
}
45
}
Explorer::Command::Remove
Definition
Remove.hpp:21
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