citra_qt: Improvements to hotkeys and ui state management (#6224)

This commit is contained in:
Tobias
2023-02-04 19:06:20 +01:00
committed by GitHub
parent 9b49d94644
commit f66d03dd48
12 changed files with 383 additions and 292 deletions

View File

@ -19,7 +19,7 @@ class ConfigureHotkeys : public QWidget {
public:
explicit ConfigureHotkeys(QWidget* parent = nullptr);
~ConfigureHotkeys();
~ConfigureHotkeys() override;
void ApplyConfiguration(HotkeyRegistry& registry);
void RetranslateUI();
@ -41,10 +41,13 @@ signals:
private:
void Configure(QModelIndex index);
bool IsUsedKey(QKeySequence key_sequence) const;
std::pair<bool, QString> IsUsedKey(QKeySequence key_sequence) const;
QList<QKeySequence> GetUsedKeyList() const;
std::unique_ptr<Ui::ConfigureHotkeys> ui;
void RestoreDefaults();
void ClearAll();
void PopupContextMenu(const QPoint& menu_location);
void RestoreHotkey(QModelIndex index);
/**
* List of keyboard keys currently registered to any of the 3DS inputs.
@ -53,5 +56,7 @@ private:
*/
QList<QKeySequence> input_keys_list;
std::unique_ptr<Ui::ConfigureHotkeys> ui;
QStandardItemModel* model;
};