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