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{
19namespace Settings
20{
21class Model;
22}
23class MusicalGrid;
24class SlotView;
25class SlotHandle;
26class NodalIntervalView;
27struct Timebars;
28class SCORE_PLUGIN_SCENARIO_EXPORT FullViewIntervalPresenter final
29 : public IntervalPresenter
30{
32
33public:
35
37 ZoomRatio zoom, const IntervalModel& viewModel, const Process::Context& ctx,
38 QGraphicsItem* parentobject, QObject* parent);
39
41
42 void updateHeight();
43 void on_zoomRatioChanged(ZoomRatio val) override;
44
45 Process::MagneticInfo magneticPosition(const QObject* obj, TimeVal t) const noexcept;
46
47 const std::vector<SlotPresenter>& getSlots() const { return m_slots; }
48 double on_playPercentageChanged(double t);
49
50 MusicalGrid& grid() const noexcept;
51
52 void on_visibleRectChanged(QRectF);
53
54 void setSnapLine(TimeVal t, bool enabled);
55
56public:
57 void intervalSelected(IntervalModel* arg_1)
58 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, intervalSelected, arg_1)
59
60private:
61 void updateTimeBars();
62 void startSlotDrag(int slot, QPointF) const override;
63 void stopSlotDrag() const override;
64
65 void requestSlotMenu(int slot, QPoint pos, QPointF sp) const override;
66 void updateScaling() override;
67 void selectedSlot(int) const override;
68
69 void on_modeChanged(IntervalModel::ViewMode);
70 void on_defaultDurationChanged(const TimeVal&);
71 void on_guiDurationChanged(const TimeVal&);
72 void
73 on_guiDurationChanged(LayerSlotPresenter& slot, double gui_width, double def_width);
74 void
75 on_guiDurationChanged(NodalSlotPresenter& slot, double gui_width, double def_width);
76 void createSlot(int pos, const FullSlot& slt);
77 void
78 setupSlot(LayerSlotPresenter& slot, const Process::ProcessModel& proc, int slot_i);
79 void setupSlot(NodalSlotPresenter& slot, int slot_i);
80 void updateProcessShape(int slot);
81 void updateProcessShape(const LayerData& layer, const LayerSlotPresenter& pres);
82 void updateProcessShape(LayerSlotPresenter& slot, int idx);
83 void updateProcessShape(NodalSlotPresenter& slot, int idx);
84 void on_slotRemoved(int);
85
86 void updateProcessesShape();
87 void updatePositions();
88
89 double rackHeight() const;
90 void on_rackChanged();
91
92 // NodalIntervalView* m_nodal{};
93 QRectF m_sceneRect{};
94
95 Timebars* m_timebars{};
96
97 MusicalGrid* m_grid{};
98
99 const Scenario::Settings::Model& m_settings;
100};
101}
The Process class.
Definition score-lib-process/Process/Process.hpp:61
Definition FullViewIntervalPresenter.hpp:30
Definition FullViewIntervalView.hpp:17
Definition IntervalModel.hpp:50
Definition IntervalPresenter.hpp:30
Definition LayerData.hpp:55
Definition MusicalGrid.hpp:16
Definition ScenarioSettingsModel.hpp:19
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition ProcessContext.hpp:12
Definition MagneticInfo.hpp:11
Definition Slot.hpp:46
Definition SlotPresenter.hpp:15
Definition SlotPresenter.hpp:43
Definition TimeSignatureItem.hpp:172
Definition TimeValue.hpp:21