shadPS4/src/qt_gui/settings_dialog.h
Exhigh f139762c64
imgui/renderer: Hide Cursor on Idle Implementation (#1266)
Implement hide cursor on idle w/ idle timeout duration (configurable via GUI). While at it add always and never to hide the cursor options as well.

* Revert commit #1211 as to not interfere with the cursor states.
* Make hide cursor on idle as the default setting w/ timeout duration of 5 seconds to hide.
* Add an input tab in the settings page to add the hide cursor setting, with hiding the idle timeout box with respect to the cursor hide option.

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2024-10-08 09:47:42 +03:00

44 lines
978 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;
};