EditPort.hpp
1 #pragma once
2 #include <State/Address.hpp>
3 
4 #include <Device/Address/AddressSettings.hpp>
5 
6 #include <Process/Commands/ProcessCommandFactory.hpp>
7 #include <Process/Dataflow/Port.hpp>
8 #include <Process/Process.hpp>
9 
10 #include <score/command/Command.hpp>
11 #include <score/command/PropertyCommand.hpp>
12 #include <score/model/path/Path.hpp>
13 
14 namespace Process
15 {
16 
17 class SCORE_LIB_PROCESS_EXPORT ChangePortSettings final : public score::Command
18 {
19  SCORE_COMMAND_DECL(
20  Process::CommandFactoryName(), ChangePortSettings, "Edit a node port")
21 public:
23 
24  void undo(const score::DocumentContext& ctx) const override;
25  void redo(const score::DocumentContext& ctx) const override;
26 
27 protected:
28  void serializeImpl(DataStreamInput& s) const override;
29  void deserializeImpl(DataStreamOutput& s) override;
30 
31 private:
32  Path<Process::Port> m_model;
33 
35 };
36 
37 }
38 
39 PROPERTY_COMMAND_T(
40  Process, SetPropagate, AudioOutlet::p_propagate, "Set port propagation")
41 SCORE_COMMAND_DECL_T(Process::SetPropagate)
42 
43 PROPERTY_COMMAND_T(Process, ChangePortAddress, Port::p_address, "Set port address")
44 SCORE_COMMAND_DECL_T(Process::ChangePortAddress)
45 
46 PROPERTY_COMMAND_T(Process, SetValue, ControlInlet::p_value, "Set port value")
47 SCORE_COMMAND_DECL_T(Process::SetValue)
48 
49 PROPERTY_COMMAND_T(Process, SetGain, AudioOutlet::p_gain, "Set port gain")
50 SCORE_COMMAND_DECL_T(Process::SetGain)
51 
52 PROPERTY_COMMAND_T(Process, SetPan, AudioOutlet::p_pan, "Set port pan")
53 SCORE_COMMAND_DECL_T(Process::SetPan)
Definition: QmlObjects.hpp:433
Definition: QmlObjects.hpp:114
Definition: EditPort.hpp:18
Definition: Port.hpp:102
The Command class.
Definition: Command.hpp:34
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
Definition: DataStreamHelpers.hpp:99
Definition: DataStreamHelpers.hpp:103
Definition: AddressSettings.hpp:131
Definition: DocumentContext.hpp:18