1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 11:25:07 +00:00
serenity/Userland/Applications/Piano/KnobsWidget.h
Lenny Maiorani 160bda7228 Applications: Use default constructors/destructors
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-02-14 22:06:55 +00:00

57 lines
1.7 KiB
C++

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2019-2020, William McPherson <willmcpherson2@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "ProcessorParameterWidget/Dropdown.h"
#include "ProcessorParameterWidget/Slider.h"
#include <AK/NonnullRefPtrVector.h>
#include <LibDSP/ProcessorParameter.h>
#include <LibDSP/Synthesizers.h>
#include <LibGUI/Frame.h>
#include <LibGUI/Label.h>
#include <LibGUI/Widget.h>
class TrackManager;
class MainWidget;
class KnobsWidget final : public GUI::Frame {
C_OBJECT(KnobsWidget)
public:
virtual ~KnobsWidget() override = default;
void update_knobs();
void cycle_waveform();
private:
KnobsWidget(TrackManager&, MainWidget&);
TrackManager& m_track_manager;
MainWidget& m_main_widget;
RefPtr<GUI::Widget> m_labels_container;
RefPtr<GUI::Label> m_volume_label;
RefPtr<GUI::Label> m_octave_label;
NonnullRefPtrVector<GUI::Label> m_synth_labels;
NonnullRefPtrVector<GUI::Label> m_delay_labels;
RefPtr<GUI::Widget> m_values_container;
RefPtr<GUI::Label> m_volume_value;
RefPtr<GUI::Label> m_octave_value;
NonnullRefPtrVector<GUI::Label> m_synth_values;
NonnullRefPtrVector<GUI::Label> m_delay_values;
RefPtr<GUI::Widget> m_knobs_container;
RefPtr<GUI::Slider> m_volume_knob;
RefPtr<GUI::Slider> m_octave_knob;
RefPtr<ProcessorParameterDropdown<LibDSP::Synthesizers::Waveform>> m_synth_waveform;
NonnullRefPtrVector<GUI::Widget> m_synth_knobs;
NonnullRefPtrVector<ProcessorParameterSlider> m_delay_knobs;
bool m_change_underlying { true };
};