summaryrefslogtreecommitdiff
path: root/Userland/Applications/Piano/PlayerWidget.h
diff options
context:
space:
mode:
authorJose Flores <jsflo.dev@gmail.com>2021-12-04 22:42:35 -0600
committerAndreas Kling <kling@serenityos.org>2021-12-11 23:07:21 +0100
commit65df30d00c1356054df197205ac1544603406250 (patch)
tree009ddd27e065d1ccf2c1e5e541b254fa2424834f /Userland/Applications/Piano/PlayerWidget.h
parent2b47e1233b825b184cc233c94e1d45adc0ecf9d5 (diff)
downloadserenity-65df30d00c1356054df197205ac1544603406250.zip
Piano: Add track controls to the player widget
Adds the ability to add a track and cycle through the tracks from player widget. Also displays the current track being played or edited in a dropdown that allows for quick track selection.
Diffstat (limited to 'Userland/Applications/Piano/PlayerWidget.h')
-rw-r--r--Userland/Applications/Piano/PlayerWidget.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Applications/Piano/PlayerWidget.h b/Userland/Applications/Piano/PlayerWidget.h
index 3152578b30..19a6198392 100644
--- a/Userland/Applications/Piano/PlayerWidget.h
+++ b/Userland/Applications/Piano/PlayerWidget.h
@@ -16,18 +16,27 @@ class PlayerWidget final : public GUI::Toolbar {
public:
virtual ~PlayerWidget() override;
+ void add_track();
+ void next_track();
+
private:
explicit PlayerWidget(TrackManager&, AudioPlayerLoop&);
TrackManager& m_track_manager;
AudioPlayerLoop& m_audio_loop;
+ Vector<String> m_track_number_choices;
RefPtr<Gfx::Bitmap> m_play_icon;
RefPtr<Gfx::Bitmap> m_pause_icon;
RefPtr<Gfx::Bitmap> m_back_icon;
RefPtr<Gfx::Bitmap> m_next_icon;
+ RefPtr<Gfx::Bitmap> m_add_track_icon;
+ RefPtr<Gfx::Bitmap> m_next_track_icon;
+ RefPtr<GUI::ComboBox> m_track_dropdown;
RefPtr<GUI::Button> m_play_button;
RefPtr<GUI::Button> m_back_button;
RefPtr<GUI::Button> m_next_button;
+ RefPtr<GUI::Button> m_add_track_button;
+ RefPtr<GUI::Button> m_next_track_button;
};