mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-11 12:45:05 +01: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();
|
||||
ui->selectorList->setCurrentRow(0);
|
||||
|
||||
// Set up used key list synchronisation
|
||||
connect(ui->inputTab, &ConfigureInput::InputKeysChanged, ui->hotkeysTab,
|
||||
&ConfigureHotkeys::OnInputKeysChanged);
|
||||
connect(ui->hotkeysTab, &ConfigureHotkeys::HotkeysChanged, ui->inputTab,
|
||||
|
@ -28,6 +28,11 @@ public:
|
||||
|
||||
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);
|
||||
|
||||
public slots:
|
||||
@ -43,6 +48,12 @@ private:
|
||||
|
||||
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;
|
||||
|
||||
QStandardItemModel* model;
|
||||
};
|
||||
|
@ -80,7 +80,11 @@ private:
|
||||
|
||||
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;
|
||||
|
||||
/// 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;
|
||||
|
||||
QKeySequence SequenceDialog::GetSequence() {
|
||||
// Only the first key is returned. The other 3, if present, are ignored.
|
||||
return QKeySequence(key_sequence->keySequence()[0]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user