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
11struct DataStreamInput;
12struct DataStreamOutput;
13
14namespace Explorer
15{
16class DeviceDocumentPlugin;
17namespace Command
18{
20{
21 SCORE_COMMAND_DECL(
22 DeviceExplorerCommandFactoryName(), UpdateDeviceSettings, "Update a device")
23public:
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
31protected:
32 void serializeImpl(DataStreamInput&) const override;
33 void deserializeImpl(DataStreamOutput&) override;
34
35private:
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