2020-01-30 19:02:45 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
* Copyright (c) 2019-2020, William McPherson <willmcpherson2@gmail.com>
|
2022-02-10 22:28:48 +03:00
|
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
2020-01-30 19:02:45 +03:00
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-30 19:02:45 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-02-06 22:33:02 +03:00
|
|
|
#include <LibGUI/Frame.h>
|
2020-01-30 19:02:45 +03:00
|
|
|
|
2020-06-15 08:33:53 +03:00
|
|
|
class TrackManager;
|
2020-01-30 19:02:45 +03:00
|
|
|
|
2020-02-02 17:07:41 +03:00
|
|
|
class WaveWidget final : public GUI::Frame {
|
2020-01-30 19:02:45 +03:00
|
|
|
C_OBJECT(WaveWidget)
|
|
|
|
public:
|
2022-02-10 22:28:48 +03:00
|
|
|
virtual ~WaveWidget() override = default;
|
2020-01-30 19:02:45 +03:00
|
|
|
|
|
|
|
private:
|
2020-06-15 08:33:53 +03:00
|
|
|
explicit WaveWidget(TrackManager&);
|
2020-01-30 19:02:45 +03:00
|
|
|
|
2020-02-02 17:07:41 +03:00
|
|
|
virtual void paint_event(GUI::PaintEvent&) override;
|
2020-01-30 19:02:45 +03:00
|
|
|
|
|
|
|
int sample_to_y(int sample) const;
|
|
|
|
|
2020-06-15 08:33:53 +03:00
|
|
|
TrackManager& m_track_manager;
|
2020-01-30 19:02:45 +03:00
|
|
|
};
|