mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-27 13:46:54 +00:00
citra-qt: Commented & documented code related to hotkeys as & when required.
This commit is contained in:
parent
9615acb550
commit
4309585623
|
@ -22,6 +22,7 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, const HotkeyRegistry& registry
|
||||||
adjustSize();
|
adjustSize();
|
||||||
ui->selectorList->setCurrentRow(0);
|
ui->selectorList->setCurrentRow(0);
|
||||||
|
|
||||||
|
// Set up used key list synchronisation
|
||||||
connect(ui->inputTab, &ConfigureInput::InputKeysChanged, ui->hotkeysTab,
|
connect(ui->inputTab, &ConfigureInput::InputKeysChanged, ui->hotkeysTab,
|
||||||
&ConfigureHotkeys::OnInputKeysChanged);
|
&ConfigureHotkeys::OnInputKeysChanged);
|
||||||
connect(ui->hotkeysTab, &ConfigureHotkeys::HotkeysChanged, ui->inputTab,
|
connect(ui->hotkeysTab, &ConfigureHotkeys::HotkeysChanged, ui->inputTab,
|
||||||
|
|
|
@ -28,6 +28,11 @@ public:
|
||||||
|
|
||||||
void EmitHotkeysChanged();
|
void EmitHotkeysChanged();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Populates the hotkey list widget using data from the provided registry.
|
||||||
|
* Called everytime the Configure dialog is opened.
|
||||||
|
* @param registry The HotkeyRegistry whose data is used to populate the list.
|
||||||
|
*/
|
||||||
void Populate(const HotkeyRegistry& registry);
|
void Populate(const HotkeyRegistry& registry);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
@ -43,6 +48,12 @@ private:
|
||||||
|
|
||||||
std::unique_ptr<Ui::ConfigureHotkeys> ui;
|
std::unique_ptr<Ui::ConfigureHotkeys> ui;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of keyboard keys currently registered to any of the 3DS inputs.
|
||||||
|
* These can't be bound to any hotkey.
|
||||||
|
* Synchronised with ConfigureInput via signal-slot.
|
||||||
|
*/
|
||||||
QList<QKeySequence> input_keys_list;
|
QList<QKeySequence> input_keys_list;
|
||||||
|
|
||||||
QStandardItemModel* model;
|
QStandardItemModel* model;
|
||||||
};
|
};
|
||||||
|
|
|
@ -80,7 +80,11 @@ private:
|
||||||
|
|
||||||
std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> device_pollers;
|
std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> device_pollers;
|
||||||
|
|
||||||
/// Keys currently registered as hotkeys
|
/**
|
||||||
|
* List of keys currently registered to hotkeys.
|
||||||
|
* These can't be bound to any input key.
|
||||||
|
* Synchronised with ConfigureHotkeys via signal-slot.
|
||||||
|
*/
|
||||||
QList<QKeySequence> hotkey_list;
|
QList<QKeySequence> hotkey_list;
|
||||||
|
|
||||||
/// A flag to indicate if keyboard keys are okay when configuring an input. If this is false,
|
/// A flag to indicate if keyboard keys are okay when configuring an input. If this is false,
|
||||||
|
|
|
@ -23,6 +23,7 @@ SequenceDialog::SequenceDialog(QWidget* parent) : QDialog(parent) {
|
||||||
SequenceDialog::~SequenceDialog() = default;
|
SequenceDialog::~SequenceDialog() = default;
|
||||||
|
|
||||||
QKeySequence SequenceDialog::GetSequence() {
|
QKeySequence SequenceDialog::GetSequence() {
|
||||||
|
// Only the first key is returned. The other 3, if present, are ignored.
|
||||||
return QKeySequence(key_sequence->keySequence()[0]);
|
return QKeySequence(key_sequence->keySequence()[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue