score
Home
Classes
Namespaces
Files
Loading...
Searching...
No Matches
UpdateDeviceSettings.hpp
1
#pragma once
2
#include <Device/Protocol/DeviceSettings.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 <QString>
10
11
#include <score_plugin_deviceexplorer_export.h>
12
13
struct
DataStreamInput
;
14
struct
DataStreamOutput
;
15
16
namespace
Explorer
17
{
18
class
DeviceDocumentPlugin;
19
namespace
Command
20
{
21
class
SCORE_PLUGIN_DEVICEEXPLORER_EXPORT
UpdateDeviceSettings
final
22
:
public
score::Command
23
{
24
SCORE_COMMAND_DECL(
25
DeviceExplorerCommandFactoryName(),
UpdateDeviceSettings
,
"Update a device"
)
26
public
:
27
UpdateDeviceSettings
(
28
const
DeviceDocumentPlugin& devplug,
const
QString& name,
29
const
Device::DeviceSettings
& parameters);
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
private
:
39
Device::DeviceSettings
m_oldParameters;
40
Device::DeviceSettings
m_newParameters;
41
};
42
}
43
}
Explorer::Command::UpdateDeviceSettings
Definition
UpdateDeviceSettings.hpp:23
score::Command
The Command class.
Definition
Command.hpp:34
DataStreamInput
Definition
DataStreamHelpers.hpp:99
DataStreamOutput
Definition
DataStreamHelpers.hpp:103
Device::DeviceSettings
Definition
DeviceSettings.hpp:20
score::DocumentContext
Definition
DocumentContext.hpp:18