mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:47:35 +00:00
Piano: Add a generic processor parameter widget
This automatically creates the correct collection of name label, value label and "editor" (knob, checkbox, dropdown) depending on the processor type and layouts them vertically.
This commit is contained in:
parent
6389384882
commit
196841fd3a
3 changed files with 69 additions and 0 deletions
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2022, kleines Filmröllchen <filmroellchen@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/StdLibExtraDetails.h>
|
||||
#include <LibCore/Object.h>
|
||||
#include <LibDSP/ProcessorParameter.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
class ProcessorParameterWidget : public GUI::Widget {
|
||||
C_OBJECT(ProcessorParameterWidget)
|
||||
public:
|
||||
ProcessorParameterWidget(DSP::ProcessorParameter& parameter);
|
||||
virtual ~ProcessorParameterWidget() = default;
|
||||
|
||||
private:
|
||||
DSP::ProcessorParameter& m_parameter;
|
||||
RefPtr<GUI::Widget> m_parameter_modifier;
|
||||
RefPtr<GUI::Label> m_label;
|
||||
RefPtr<GUI::Label> m_value_label;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue