mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-12 04:35:56 +00:00
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 / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* added recentFiles save/load * gui language * fixups for language * fixed language issue with savedata (it was saving based on gui language and not on console language) * clang fix * elf dirs added * added theme
59 lines
1.5 KiB
C++
59 lines
1.5 KiB
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <span>
|
|
#include <QDialog>
|
|
#include <QGroupBox>
|
|
#include <QPushButton>
|
|
|
|
#include "common/config.h"
|
|
#include "common/path_util.h"
|
|
#include "gui_settings.h"
|
|
#include "qt_gui/compatibility_info.h"
|
|
|
|
namespace Ui {
|
|
class SettingsDialog;
|
|
}
|
|
|
|
class SettingsDialog : public QDialog {
|
|
Q_OBJECT
|
|
public:
|
|
explicit SettingsDialog(std::shared_ptr<gui_settings> gui_settings,
|
|
std::shared_ptr<CompatibilityInfoClass> m_compat_info,
|
|
QWidget* parent = nullptr);
|
|
~SettingsDialog();
|
|
|
|
bool eventFilter(QObject* obj, QEvent* event) override;
|
|
void updateNoteTextEdit(const QString& groupName);
|
|
|
|
int exec() override;
|
|
|
|
signals:
|
|
void LanguageChanged(const QString& locale);
|
|
void CompatibilityChanged();
|
|
void BackgroundOpacityChanged(int opacity);
|
|
|
|
private:
|
|
void LoadValuesFromConfig();
|
|
void UpdateSettings();
|
|
void ResetInstallFolders();
|
|
void InitializeEmulatorLanguages();
|
|
void OnLanguageChanged(int index);
|
|
void OnCursorStateChanged(s16 index);
|
|
void closeEvent(QCloseEvent* event) override;
|
|
void setDefaultValues();
|
|
|
|
std::unique_ptr<Ui::SettingsDialog> ui;
|
|
|
|
std::map<std::string, int> languages;
|
|
|
|
QString defaultTextEdit;
|
|
|
|
int initialHeight;
|
|
|
|
bool is_saving = false;
|
|
std::shared_ptr<gui_settings> m_gui_settings;
|
|
};
|