Loading...
Searching...
No Matches
PatternView.hpp
1#pragma once
2#include <State/Message.hpp>
3
4#include <Process/LayerView.hpp>
5
6namespace Process
7{
8class Port;
9class ControlInlet;
10class PortFactoryList;
11}
12namespace score
13{
14struct DocumentContext;
15class QGraphicsNoteChooser;
16}
17namespace Patternist
18{
19class ProcessModel;
20class View final : public Process::LayerView
21{
22 W_OBJECT(View)
23public:
24 explicit View(const Patternist::ProcessModel& model, QGraphicsItem* parent);
25 ~View() override;
26
27 void toggled(int lane, int index) W_SIGNAL(toggled, lane, index);
28 void noteChanged(int lane, int note) W_SIGNAL(noteChanged, lane, note);
29 void noteChangeFinished() W_SIGNAL(noteChangeFinished);
30
31private:
32 void updateLanes();
33 void paint_impl(QPainter*) const override;
34
35 void mousePressEvent(QGraphicsSceneMouseEvent* event) override;
36 void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override;
37 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override;
38 void dropEvent(QGraphicsSceneDragDropEvent* event) override;
39
40 const Patternist::ProcessModel& m_model;
41
42 std::vector<score::QGraphicsNoteChooser*> m_lanes;
43 int m_execPosition{-1};
44};
45}
Definition PatternModel.hpp:48
Definition PatternView.hpp:21
Definition LayerView.hpp:21
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Base toolkit upon which the software is built.
Definition Application.cpp:90