2 #include <Curve/Palette/CurvePoint.hpp>
3 #include <Curve/Point/CurvePointView.hpp>
4 #include <Curve/Segment/CurveSegmentView.hpp>
6 #include <score/document/DocumentContext.hpp>
7 #include <score/selection/SelectionDispatcher.hpp>
8 #include <score/statemachine/CommonSelectionState.hpp>
9 #include <score/statemachine/GraphicsSceneTool.hpp>
11 #include <QGraphicsItem>
24 template <
typename Po
intFun,
typename SegmentFun,
typename NothingFun>
26 QPointF scenePoint,
const QGraphicsItem* pressedItem, PointFun pt_fun,
27 SegmentFun seg_fun, NothingFun nothing_fun)
const
35 switch(pressedItem->type())
37 case PointView::Type: {
38 auto pt = safe_cast<const PointView*>(pressedItem);
39 if(pt->contains(pt->mapFromScene(scenePoint)))
44 case SegmentView::Type: {
45 auto segt = safe_cast<const SegmentView*>(pressedItem);
46 if(segt->contains(segt->mapFromScene(scenePoint)))
60 template <
typename Model>
63 bool multi = CommonSelectionState::multiSelection())
66 filterSelections(&model, selected, multi));
Definition: CurveModel.hpp:25
Definition: Selection.hpp:12
The SelectionDispatcher class.
Definition: SelectionDispatcher.hpp:15
Utilities and base classes for 1D curves.
Definition: FocusDispatcher.hpp:12
Definition: DocumentContext.hpp:18