SetSegmentParametersCommandObject.hpp
1 #pragma once
2 #include <Curve/Commands/SetSegmentParameters.hpp>
3 
4 #include <score/command/Dispatchers/SingleOngoingCommandDispatcher.hpp>
5 #include <score/tools/std/Optional.hpp>
6 
7 #include <ossia/detail/flat_map.hpp>
8 
9 #include <QPoint>
10 
11 namespace score
12 {
13 class CommandStackFacade;
14 } // namespace score
15 
16 namespace Curve
17 {
18 class Model;
19 class Presenter;
20 class StateBase;
22 {
23 public:
25 
26  void setCurveState(Curve::StateBase* stateBase) { m_state = stateBase; }
27 
28  void press();
29 
30  void move();
31 
32  void release();
33 
34  void cancel();
35 
36 private:
37  const Model& m_model;
39 
40  Curve::StateBase* m_state{};
41  QPointF m_originalPress;
42  ossia::flat_map<
43  Id<Curve::SegmentModel>, std::pair<std::optional<double>, std::optional<double>>>
44  m_orig;
45 };
46 }
Definition: CurveModel.hpp:25
Definition: SetSegmentParametersCommandObject.hpp:22
Definition: CurvePaletteBaseStates.hpp:20
The SingleOngoingCommandDispatcher class.
Definition: SingleOngoingCommandDispatcher.hpp:17
The id_base_t class.
Definition: Identifier.hpp:57
A small abstraction layer over the score::CommandStack.
Definition: CommandStackFacade.hpp:20
Utilities and base classes for 1D curves.
Definition: FocusDispatcher.hpp:12
Base toolkit upon which the software is built.
Definition: Application.cpp:90