1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:37:36 +00:00

Piano: Move piano roll internals to AudioEngine

The piano roll data definitely belongs in AudioEngine along with the
note and time data. Now RollWidget only has GUI information, much like
the other widgets.

Note that this commit exacerbates issue #1158 which is caused by
RollWidget::paint_event().
This commit is contained in:
William McPherson 2020-02-06 19:13:25 +11:00 committed by Andreas Kling
parent 82d17d2c79
commit 9a05bbaace
6 changed files with 47 additions and 38 deletions

View file

@ -37,8 +37,6 @@ class RollWidget final : public GUI::ScrollableWidget {
public:
virtual ~RollWidget() override;
void update_roll();
private:
RollWidget(GUI::Widget* parent, AudioEngine&);
@ -46,9 +44,4 @@ private:
virtual void mousedown_event(GUI::MouseEvent& event) override;
AudioEngine& m_audio_engine;
int m_horizontal_notes { 32 };
Switch m_roll_notes[note_count][32] { { Off } };
int m_current_column { 0 };
int m_previous_column { m_horizontal_notes - 1 };
};