From 7c6eb2997cbba350e7384151e13659271508e08f Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 24 Nov 2023 15:13:10 +1100 Subject: Migrate 'now playing' screen to lua --- src/ui/include/screen_playing.hpp | 73 --------------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 src/ui/include/screen_playing.hpp (limited to 'src/ui/include/screen_playing.hpp') diff --git a/src/ui/include/screen_playing.hpp b/src/ui/include/screen_playing.hpp deleted file mode 100644 index 185c55cc..00000000 --- a/src/ui/include/screen_playing.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2023 jacqueline - * - * SPDX-License-Identifier: GPL-3.0-only - */ - -#pragma once - -#include -#include -#include -#include - -#include "bindey/property.h" -#include "esp_log.h" -#include "lvgl.h" - -#include "database.hpp" -#include "future_fetcher.hpp" -#include "model_playback.hpp" -#include "model_top_bar.hpp" -#include "screen.hpp" -#include "track.hpp" -#include "track_queue.hpp" - -namespace ui { -namespace screens { - -/* - * The 'Now Playing' / 'Currently Playing' screen that contains information - * about the current track, as well as playback controls. - */ -class Playing : public Screen { - public: - explicit Playing(models::TopBar&, - models::Playback& playback_model, - std::weak_ptr db, - audio::TrackQueue& queue); - ~Playing(); - - auto Tick() -> void override; - - auto OnFocusAboveFold() -> void; - auto OnFocusBelowFold() -> void; - - Playing(const Playing&) = delete; - Playing& operator=(const Playing&) = delete; - - private: - auto control_button(lv_obj_t* parent, char* icon) -> lv_obj_t*; - auto next_up_label(lv_obj_t* parent, const std::pmr::string& text) - -> lv_obj_t*; - - std::weak_ptr db_; - audio::TrackQueue& queue_; - - bindey::property> current_track_; - bindey::property>> next_tracks_; - - std::unique_ptr>> - new_track_; - std::unique_ptr< - database::FutureFetcher>>> - new_next_tracks_; - - lv_obj_t* next_up_header_; - lv_obj_t* next_up_label_; - lv_obj_t* next_up_hint_; - lv_obj_t* next_up_container_; -}; - -} // namespace screens -} // namespace ui -- cgit v1.2.3