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 struct DataStreamInput;
12 struct DataStreamOutput;
13 
14 namespace Explorer
15 {
16 class DeviceDocumentPlugin;
17 namespace Command
18 {
20 {
21  SCORE_COMMAND_DECL(
22  DeviceExplorerCommandFactoryName(), UpdateDeviceSettings, "Update a device")
23 public:
25  const DeviceDocumentPlugin& devplug, const QString& name,
26  const Device::DeviceSettings& parameters);
27 
28  void undo(const score::DocumentContext& ctx) const override;
29  void redo(const score::DocumentContext& ctx) const override;
30 
31 protected:
32  void serializeImpl(DataStreamInput&) const override;
33  void deserializeImpl(DataStreamOutput&) override;
34 
35 private:
36  Device::DeviceSettings m_oldParameters;
37  Device::DeviceSettings m_newParameters;
38 };
39 }
40 }
Definition: UpdateDeviceSettings.hpp:20
The Command class.
Definition: Command.hpp:34
Definition: DataStreamHelpers.hpp:99
Definition: DataStreamHelpers.hpp:103
Definition: DeviceSettings.hpp:20
Definition: DocumentContext.hpp:18