Loading...
Searching...
No Matches
FullViewIntervalPresenter.hpp
1#pragma once
2#include <Scenario/Document/Interval/FullView/FullViewIntervalView.hpp>
3#include <Scenario/Document/Interval/IntervalModel.hpp>
4#include <Scenario/Document/Interval/IntervalPresenter.hpp>
5#include <Scenario/Document/Interval/Slot.hpp>
6#include <Scenario/Document/Interval/SlotPresenter.hpp>
7
8#include <Magnetism/MagneticInfo.hpp>
9
10#include <score/selection/SelectionDispatcher.hpp>
11
12#include <verdigris>
13namespace Process
14{
15class DefaultHeaderDelegate;
16}
17namespace Scenario
18{
20inline constexpr double FullViewTopMargin = 24.;
21
22namespace Settings
23{
24class Model;
25}
26class MusicalGrid;
27class SlotView;
28class SlotHandle;
29class NodalIntervalView;
30struct Timebars;
31class SCORE_PLUGIN_SCENARIO_EXPORT FullViewIntervalPresenter final
32 : public IntervalPresenter
33{
35
36public:
38
40 ZoomRatio zoom, const IntervalModel& viewModel, const Process::Context& ctx,
41 QGraphicsItem* parentobject, QObject* parent);
42
44
45 void updateHeight();
46 void on_zoomRatioChanged(ZoomRatio val) override;
47
48 Process::MagneticInfo magneticPosition(const QObject* obj, TimeVal t) const noexcept;
49
50 const std::vector<SlotPresenter>& getSlots() const { return m_slots; }
51 double on_playPercentageChanged(double t);
52
53 MusicalGrid& grid() const noexcept;
54
55 void on_visibleRectChanged(QRectF);
56
57 void setSnapLine(TimeVal t, bool enabled);
58
59private:
60 void updateTimeBars();
61 void startSlotDrag(int slot, QPointF) const override;
62 void stopSlotDrag() const override;
63
64 void requestSlotMenu(int slot, QPoint pos, QPointF sp) const override;
65 void updateScaling() override;
66 void selectedSlot(int) const override;
67
68 void on_modeChanged(IntervalModel::ViewMode);
69 void on_defaultDurationChanged(const TimeVal&);
70 void on_guiDurationChanged(const TimeVal&);
71 void
72 on_guiDurationChanged(LayerSlotPresenter& slot, double gui_width, double def_width);
73 void
74 on_guiDurationChanged(NodalSlotPresenter& slot, double gui_width, double def_width);
75 void createSlot(int pos, const FullSlot& slt);
76 void
77 setupSlot(LayerSlotPresenter& slot, const Process::ProcessModel& proc, int slot_i);
78 void setupSlot(NodalSlotPresenter& slot, int slot_i);
79 void updateProcessShape(int slot);
80 void updateProcessShape(const LayerData& layer, const LayerSlotPresenter& pres);
81 void updateProcessShape(LayerSlotPresenter& slot, int idx);
82 void updateProcessShape(NodalSlotPresenter& slot, int idx);
83 void on_slotRemoved(int);
84
85 void updateProcessesShape();
86 void updatePositions();
87
88 double rackHeight() const;
89 void on_rackChanged();
90
91 // NodalIntervalView* m_nodal{};
92 QRectF m_sceneRect{};
93
94 Timebars* m_timebars{};
95
96 MusicalGrid* m_grid{};
97
98 const Scenario::Settings::Model& m_settings;
99};
100}
The Process class.
Definition score-lib-process/Process/Process.hpp:75
Definition FullViewIntervalPresenter.hpp:33
Definition FullViewIntervalView.hpp:17
Definition IntervalModel.hpp:50
Definition IntervalPresenter.hpp:30
Definition LayerData.hpp:55
Definition MusicalGrid.hpp:16
Definition ScenarioSettingsModel.hpp:21
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
constexpr double FullViewTopMargin
Space kept above the full view interval, for the time signature bar.
Definition FullViewIntervalPresenter.hpp:20
Definition ProcessContext.hpp:12
Definition MagneticInfo.hpp:11
Definition Slot.hpp:46
Definition SlotPresenter.hpp:15
Definition SlotPresenter.hpp:43
Definition TimeSignatureItem.hpp:173
Definition TimeValue.hpp:21