9e1b0af259
Abstracts most of the input mechanisms under an InputSubsystem class that is managed by the frontends, eliminating any static constructors and destructors. This gets rid of global accessor functions and also allows the frontends to have a more fine-grained control over the lifecycle of the input subsystem. This also makes it explicit which interfaces rely on the input subsystem instead of making it opaque in the interface functions. All that remains to migrate over is the factories, which can be done in a separate change.
47 lines
953 B
C++
47 lines
953 B
C++
// Copyright 2016 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <QDialog>
|
|
|
|
class HotkeyRegistry;
|
|
|
|
namespace InputCommon {
|
|
class InputSubsystem;
|
|
}
|
|
|
|
namespace Ui {
|
|
class ConfigureDialog;
|
|
}
|
|
|
|
class ConfigureDialog : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ConfigureDialog(QWidget* parent, HotkeyRegistry& registry,
|
|
InputCommon::InputSubsystem* input_subsystem);
|
|
~ConfigureDialog() override;
|
|
|
|
void ApplyConfiguration();
|
|
|
|
private slots:
|
|
void OnLanguageChanged(const QString& locale);
|
|
|
|
signals:
|
|
void LanguageChanged(const QString& locale);
|
|
|
|
private:
|
|
void changeEvent(QEvent* event) override;
|
|
|
|
void RetranslateUI();
|
|
|
|
void SetConfiguration();
|
|
void UpdateVisibleTabs();
|
|
void PopulateSelectionList();
|
|
|
|
std::unique_ptr<Ui::ConfigureDialog> ui;
|
|
HotkeyRegistry& registry;
|
|
};
|