Zrythm v2.0.0-alpha.1
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/chord_preset_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::utils::AppSettings * appSettings READ appSettings CONSTANT FINAL)
36 Q_PROPERTY (
37 zrythm::gui::ProjectManager * projectManager READ projectManager CONSTANT
38 FINAL)
39 Q_PROPERTY (
41 pluginManager CONSTANT FINAL)
42 Q_PROPERTY (
43 zrythm::gui::AlertManager * alertManager READ alertManager CONSTANT FINAL)
44 Q_PROPERTY (
45 zrythm::gui::TranslationManager * translationManager READ translationManager
46 CONSTANT FINAL)
47 Q_PROPERTY (
48 zrythm::gui::backend::DeviceManager * deviceManager READ deviceManager
49 CONSTANT FINAL)
50 Q_PROPERTY (
51 zrythm::gui::FileSystemModel * fileSystemModel READ fileSystemModel CONSTANT
52 FINAL)
53 Q_PROPERTY (
54 zrythm::engine::session::ControlRoom * controlRoom READ controlRoom CONSTANT
55 FINAL)
56 Q_PROPERTY (
57 ChordPresetManager * chordPresetManager READ chordPresetManager CONSTANT
58 FINAL)
59 QML_ELEMENT
60 QML_UNCREATABLE ("")
61
62public:
63 ZrythmApplication (int &argc, char ** argv);
64 ~ZrythmApplication () override;
65 Q_DISABLE_COPY_MOVE (ZrythmApplication)
66
67 void setup_ui ();
68 void setup_ipc ();
69 void launch_engine_process ();
70
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 ChordPresetManager * chordPresetManager () const;
82
83 DirectoryManager &get_directory_manager () const;
84 QQmlApplicationEngine * get_qml_engine () const;
85 std::shared_ptr<gui::backend::DeviceManager> get_device_manager () const;
86 dsp::IHardwareAudioInterface &hw_audio_interface () const;
87
88private:
89 void setup_command_line_options ();
90 void post_exec_initialization ();
91 void setup_device_manager ();
92 void setup_control_room ();
93
94protected:
95 bool notify (QObject * receiver, QEvent * event) override;
96
97private Q_SLOTS:
98 void onEngineOutput ();
99 void onAboutToQuit ();
100
101public:
102 QCommandLineParser cmd_line_parser_;
103
104private:
105 class Impl;
106 std::unique_ptr<Impl> impl_;
107};
108
109} // namespace zrythm::gui
Flat list model of all chord presets (built-in + user).
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.
Wrapper over juce::AudioDeviceManager that exposes changes as signals.
The PluginManager is responsible for scanning and keeping track of available Plugin's.