Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm_application.h
1// SPDX-FileCopyrightText: © 2019-2026 Alexandros Theodotou <alex@zrythm.org>
2/* SPDX-License-Identifier: LicenseRef-ZrythmLicense */
3
4#pragma once
5
6#include "engine/session/control_room.h"
7#include "gui/backend/alert_manager.h"
8#include "gui/backend/backend/theme_manager.h"
9#include "gui/backend/device_manager.h"
10#include "gui/backend/file_system_model.h"
11#include "gui/backend/plugin_manager.h"
12#include "gui/backend/project_manager.h"
13#include "gui/backend/translation_manager.h"
14#include "utils/app_settings.h"
15#include "utils/qt.h"
16
17#include <QApplication>
18#include <QCommandLineParser>
19#include <QQmlApplicationEngine>
20
22
23namespace zrythm::dsp
24{
26}
27
28namespace zrythm::gui
29{
30
31class ZrythmApplication final : public QApplication
32{
33 Q_OBJECT
34 Q_PROPERTY (
35 zrythm::gui::ThemeManager * themeManager READ themeManager CONSTANT FINAL)
36 Q_PROPERTY (
37 zrythm::utils::AppSettings * appSettings READ appSettings CONSTANT FINAL)
38 Q_PROPERTY (
39 zrythm::gui::ProjectManager * projectManager READ projectManager CONSTANT
40 FINAL)
41 Q_PROPERTY (
43 pluginManager CONSTANT FINAL)
44 Q_PROPERTY (
45 zrythm::gui::AlertManager * alertManager READ alertManager CONSTANT FINAL)
46 Q_PROPERTY (
47 zrythm::gui::TranslationManager * translationManager READ translationManager
48 CONSTANT FINAL)
49 Q_PROPERTY (
50 zrythm::gui::backend::DeviceManager * deviceManager READ deviceManager
51 CONSTANT FINAL)
52 Q_PROPERTY (
53 zrythm::gui::FileSystemModel * fileSystemModel READ fileSystemModel CONSTANT
54 FINAL)
55 Q_PROPERTY (
56 zrythm::engine::session::ControlRoom * controlRoom READ controlRoom CONSTANT
57 FINAL)
58 QML_ELEMENT
59 QML_UNCREATABLE ("")
60
61public:
62 ZrythmApplication (int &argc, char ** argv);
63 ~ZrythmApplication () override;
64 Q_DISABLE_COPY_MOVE (ZrythmApplication)
65
66 void setup_ui ();
67 void setup_ipc ();
68 void launch_engine_process ();
69
70 zrythm::gui::ThemeManager * themeManager () const;
71 zrythm::utils::AppSettings * appSettings () const;
72 zrythm::gui::ProjectManager * projectManager () const;
73 old_dsp::plugins::PluginManager * pluginManager () const;
74 zrythm::gui::AlertManager * alertManager () const;
75 zrythm::gui::TranslationManager * translationManager () const;
76 zrythm::gui::backend::DeviceManager * deviceManager () const;
77 zrythm::gui::FileSystemModel * fileSystemModel () const;
78
79 engine::session::ControlRoom * controlRoom () const;
80
81 DirectoryManager &get_directory_manager () const;
82 QQmlApplicationEngine * get_qml_engine () const;
83 std::shared_ptr<gui::backend::DeviceManager> get_device_manager () const;
84 dsp::IHardwareAudioInterface &hw_audio_interface () const;
85
86private:
87 void setup_command_line_options ();
88 void post_exec_initialization ();
89 void setup_device_manager ();
90 void setup_control_room ();
91
92private Q_SLOTS:
93 void onEngineOutput ();
94 void onAboutToQuit ();
95
96public:
97 QCommandLineParser cmd_line_parser_;
98
99private:
100 class Impl;
101 std::unique_ptr<Impl> impl_;
102};
103
104} // namespace zrythm::gui
This can just be created on the stack as needed since it uses globally available information.
Abstraction for hardware audio interface.
Abstraction to control the signal coming in from Master and going out into the speakers.
This doesn't work - see https://forum.qt.io/topic/124965/how-to-define-a-property-of-type-palette/8.
Wrapper over juce::AudioDeviceManager that exposes changes as signals.
The PluginManager is responsible for scanning and keeping track of available Plugin's.