mirror of
https://github.com/jorenchik/mdemory.git
synced 2026-03-22 00:26:21 +00:00
help view completed
This commit is contained in:
102
resources/shortcuts.temp
Normal file
102
resources/shortcuts.temp
Normal file
@@ -0,0 +1,102 @@
|
||||
Redaktors
|
||||
|
||||
QShortcut* shortcutSave = new QShortcut(QKeySequence("Ctrl+S"), editorWindow);
|
||||
QObject::connect(shortcutSave, &QShortcut::activated, []() {
|
||||
if (editor->isVisible()) {
|
||||
setupEditorSave();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
Saraksts
|
||||
|
||||
addShortcut("Ctrl+O", [actionOpen]() {
|
||||
actionOpen->trigger();
|
||||
});
|
||||
addShortcut("Ctrl+H", [actionHelp]() {
|
||||
actionHelp->trigger();
|
||||
});
|
||||
addShortcut("Ctrl+,", [openSettings]() {
|
||||
openSettings->trigger();
|
||||
});
|
||||
addShortcut("Ctrl+S", [toolbar]() {
|
||||
toolbar->btnSave.click();
|
||||
});
|
||||
addShortcut("Ctrl+P", [toolbar]() {
|
||||
toolbar->btnPractice.click();
|
||||
});
|
||||
addShortcut("Ctrl+A", [toolbar]() {
|
||||
toolbar->btnAdd.click();
|
||||
});
|
||||
addShortcut("Ctrl+L", [toolbar]() {
|
||||
toolbar->btnLoad.click();
|
||||
});
|
||||
|
||||
|
||||
|
||||
Mācīšanās
|
||||
|
||||
|
||||
addShortcut("l", []() {
|
||||
if (btnNext->isVisible()) {
|
||||
btnNext->click();
|
||||
}
|
||||
});
|
||||
|
||||
addShortcut(
|
||||
"Ctrl+S",
|
||||
[]() {
|
||||
saveMdem();
|
||||
}
|
||||
);
|
||||
|
||||
addShortcut("Z", []() {
|
||||
if (btnNotRemembered->isVisible()) {
|
||||
btnNotRemembered->click();
|
||||
}
|
||||
});
|
||||
btnHard->setText("Grūti (X)");
|
||||
addShortcut("X", []() {
|
||||
if (btnHard->isVisible()) {
|
||||
btnHard->click();
|
||||
}
|
||||
});
|
||||
btnMedium->setText("Vidēji (C)");
|
||||
addShortcut("C", []() {
|
||||
if (btnMedium->isVisible()) {
|
||||
btnMedium->click();
|
||||
}
|
||||
});
|
||||
btnEasy->setText("Viegli (V)");
|
||||
addShortcut("V", []() {
|
||||
if (btnEasy->isVisible()) {
|
||||
btnEasy->click();
|
||||
}
|
||||
});
|
||||
addShortcut(
|
||||
"Return",
|
||||
[]() {
|
||||
if (btnCheck->isVisible()) {
|
||||
btnCheck->click();
|
||||
}
|
||||
if (btnShowAnswer->isVisible()) {
|
||||
btnShowAnswer->click();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Settings
|
||||
|
||||
auto shortcutSave = new QShortcut(
|
||||
QKeySequence("Ctrl+S"),
|
||||
settingsWindow
|
||||
);
|
||||
QObject::connect(
|
||||
shortcutSave,
|
||||
&QShortcut::activated,
|
||||
[saveSettings]() {
|
||||
saveSettings();
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user