score-plugin-curve/Curve/Palette/Tools/SmartTool.hpp
1 #pragma once
2 #include "CurveTool.hpp"
3 
4 #include <Curve/Palette/CommandObjects/MovePointCommandObject.hpp>
5 #include <Curve/Palette/CurvePoint.hpp>
6 
7 #include <QPoint>
8 
9 namespace Curve
10 {
11 class ToolPalette;
12 class OngoingState;
13 class SelectionState;
14 
15 class SmartTool final : public Curve::CurveTool
16 {
17 public:
18  explicit SmartTool(Curve::ToolPalette& sm, const score::DocumentContext& context);
19 
20  void on_pressed(QPointF scene, Curve::Point sp);
21  void on_moved(QPointF scene, Curve::Point sp);
22  void on_released(QPointF scene, Curve::Point sp);
23 
24 private:
25  Curve::SelectionState* m_state{};
26  Curve::OngoingState* m_moveState{};
27 
28  bool m_nothingPressed = false;
30 };
31 }
Definition: CurveTool.hpp:19
Definition: MovePointCommandObject.hpp:12
Definition: OngoingState.hpp:14
Definition: SelectionState.hpp:13
Definition: score-plugin-curve/Curve/Palette/Tools/SmartTool.hpp:16
Definition: CurvePalette.hpp:33
Utilities and base classes for 1D curves.
Definition: FocusDispatcher.hpp:12
Definition: DocumentContext.hpp:18