MusicalGrid.hpp
1 #pragma once
2 #include <Process/TimeValue.hpp>
3 
4 #include <Scenario/Document/Interval/IntervalModel.hpp>
5 
6 #include <ossia-qt/time.hpp>
7 
8 namespace Scenario
9 {
10 struct TimeSignatureMap;
11 struct Timebars;
12 class LightBars;
13 class LighterBars;
14 
15 class MusicalGrid : public QObject
16 {
17  W_OBJECT(MusicalGrid)
18 public:
19  MusicalGrid(Timebars& timebars)
20  : timebars{timebars}
21  {
22  }
23 
24  Timebars& timebars;
25  void setMeasures(const TimeSignatureMap& m) { m_measures = &m; }
26 
27  struct timings
28  {
29  double pos_x{};
30  ossia::bar_time timings;
31  ossia::bar_time increment;
32  };
33 
34  std::vector<timings> mainPositions;
35  //std::vector<timings> subPositions;
36 
37  void changed() W_SIGNAL(changed);
38 
39  void
40  compute(TimeVal timeDelta, ZoomRatio m_zoomRatio, QRectF sceneRect, TimeVal x0_time);
41 
42  const TimeSignatureMap* m_measures{};
43 };
44 
45 }
Definition: MusicalGrid.hpp:16
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: MusicalGrid.hpp:28
Definition: TimeSignatureMap.hpp:26
Definition: TimeSignatureItem.hpp:172
Definition: TimeValue.hpp:21