2021-03-21 08:56:18 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, Cesar Torres <shortanemoia@protonmail.com>
|
2022-02-10 16:28:48 -03:00
|
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
2021-03-21 08:56:18 -03:00
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-03-21 08:56:18 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2021-09-30 01:55:42 -03:00
|
|
|
#include "VisualizationWidget.h"
|
2021-03-21 08:56:18 -03:00
|
|
|
#include <LibGUI/Frame.h>
|
|
|
|
|
|
2022-02-27 23:05:04 -03:00
|
|
|
class AlbumCoverVisualizationWidget final : public VisualizationWidget {
|
|
|
|
|
C_OBJECT(AlbumCoverVisualizationWidget)
|
2021-03-21 08:56:18 -03:00
|
|
|
|
|
|
|
|
public:
|
2022-02-27 23:05:04 -03:00
|
|
|
~AlbumCoverVisualizationWidget() override = default;
|
2022-02-27 22:29:38 -03:00
|
|
|
void start_new_file(StringView) override;
|
2021-03-21 08:56:18 -03:00
|
|
|
|
|
|
|
|
private:
|
2022-05-06 17:14:16 -03:00
|
|
|
void render(GUI::PaintEvent&, FixedArray<float> const&) override { }
|
2021-03-21 08:56:18 -03:00
|
|
|
void paint_event(GUI::PaintEvent&) override;
|
2022-02-27 23:05:04 -03:00
|
|
|
AlbumCoverVisualizationWidget() = default;
|
2022-02-27 22:29:38 -03:00
|
|
|
ErrorOr<NonnullRefPtr<Gfx::Bitmap>> get_album_cover(StringView const filename);
|
2021-03-21 08:56:18 -03:00
|
|
|
|
|
|
|
|
RefPtr<Gfx::Bitmap> m_serenity_bg;
|
2022-02-27 22:29:38 -03:00
|
|
|
RefPtr<Gfx::Bitmap> m_album_cover;
|
2021-03-21 08:56:18 -03:00
|
|
|
};
|