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
|
|
|
*/
|
|
|
|
|
2023-02-09 15:22:40 +03:00
|
|
|
#include "TrackControlsWidget.h"
|
2020-01-30 19:02:45 +03:00
|
|
|
#include "MainWidget.h"
|
2022-07-23 16:52:50 +03:00
|
|
|
#include "ProcessorParameterWidget/ParameterWidget.h"
|
2020-06-15 08:33:53 +03:00
|
|
|
#include "TrackManager.h"
|
2021-09-28 19:01:39 +03:00
|
|
|
#include <LibDSP/ProcessorParameter.h>
|
2020-02-06 22:33:02 +03:00
|
|
|
#include <LibGUI/BoxLayout.h>
|
|
|
|
#include <LibGUI/Label.h>
|
2021-08-27 17:20:09 +03:00
|
|
|
#include <LibGfx/Orientation.h>
|
2020-01-30 19:02:45 +03:00
|
|
|
|
2023-02-09 15:22:40 +03:00
|
|
|
TrackControlsWidget::TrackControlsWidget(TrackManager& track_manager, MainWidget& main_widget)
|
2020-06-15 08:33:53 +03:00
|
|
|
: m_track_manager(track_manager)
|
2020-01-30 19:02:45 +03:00
|
|
|
, m_main_widget(main_widget)
|
|
|
|
{
|
2022-07-23 16:52:50 +03:00
|
|
|
set_layout<GUI::HorizontalBoxLayout>();
|
2023-02-09 17:26:26 +03:00
|
|
|
set_preferred_width(GUI::SpecialDimension::Grow);
|
2020-01-30 19:02:45 +03:00
|
|
|
set_fill_with_background_color(true);
|
|
|
|
|
2022-07-23 16:52:50 +03:00
|
|
|
for (auto& parameter : m_track_manager.current_track()->track_mastering()->parameters())
|
|
|
|
m_parameter_widgets.append(add<ProcessorParameterWidget>(parameter));
|
|
|
|
|
|
|
|
for (auto& parameter : m_track_manager.current_track()->synth()->parameters())
|
|
|
|
m_parameter_widgets.append(add<ProcessorParameterWidget>(parameter));
|
2020-02-05 10:00:16 +03:00
|
|
|
|
2022-07-23 16:52:50 +03:00
|
|
|
for (auto& parameter : m_track_manager.current_track()->delay()->parameters())
|
|
|
|
m_parameter_widgets.append(add<ProcessorParameterWidget>(parameter));
|
2020-01-30 19:02:45 +03:00
|
|
|
}
|