shadPS4/src/qt_gui/settings_dialog.h
DanielSvoboda bd9f82df94
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
fix descriptionText size | missing translations (#1319)
* fix descriptionText size

* +

avoid 'blinking'

* Update ru_RU.ts

* TR

* Update pt_BR.ts

* emulatorLanguage alphabetical order

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2024-10-13 15:49:39 +03:00

46 lines
1002 B
C++

// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <span>
#include <QDialog>
#include <QGroupBox>
#include <QPushButton>
#include "common/config.h"
#include "common/path_util.h"
namespace Ui {
class SettingsDialog;
}
class SettingsDialog : public QDialog {
Q_OBJECT
public:
explicit SettingsDialog(std::span<const QString> physical_devices, QWidget* parent = nullptr);
~SettingsDialog();
bool eventFilter(QObject* obj, QEvent* event) override;
void updateNoteTextEdit(const QString& groupName);
int exec() override;
signals:
void LanguageChanged(const std::string& locale);
private:
void LoadValuesFromConfig();
void InitializeEmulatorLanguages();
void OnLanguageChanged(int index);
void OnCursorStateChanged(s16 index);
std::unique_ptr<Ui::SettingsDialog> ui;
std::map<std::string, int> languages;
QString defaultTextEdit;
int initialHeight;
};