Zrythm
v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
translation_manager.h
1
// SPDX-FileCopyrightText: © 2024-2025 Alexandros Theodotou <alex@zrythm.org>
2
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4
#pragma once
5
6
#include "utils/app_settings.h"
7
8
#include <QTranslator>
9
#include <QtQmlIntegration/qqmlintegration.h>
10
11
namespace
zrythm::gui
12
{
13
14
class
TranslationManager :
public
QObject
15
{
16
Q_OBJECT
17
QML_ELEMENT
18
QML_UNCREATABLE (
""
)
19
20
public
:
21
explicit
TranslationManager (
22
utils::AppSettings
&app_settings,
23
QObject * parent =
nullptr
);
24
25
TranslationManager * get_instance ();
26
27
Q_INVOKABLE
static
QString getSystemLocale ();
28
29
Q_INVOKABLE
void
loadTranslation (
const
QString &locale);
30
31
private
:
32
utils::AppSettings
&app_settings_;
33
QTranslator translator_;
34
bool
translator_loaded_ =
false
;
35
};
36
37
}
// namespace zrythm::gui
zrythm::utils::AppSettings
Definition
app_settings.h:46
src
gui
backend
translation_manager.h
Generated by
1.15.0