Set hotkey for screen rotation

This commit is contained in:
Vitor Kiguchi 2020-01-08 18:33:37 -03:00
parent be88d2a59a
commit 5eb9a5b3bc
3 changed files with 8 additions and 2 deletions

View file

@ -410,6 +410,8 @@ void GMainWindow::InitializeHotkeys() {
});
connect(hotkey_registry.GetHotkey("Main Window", "Swap Screens", render_window),
&QShortcut::activated, ui.action_Screen_Layout_Swap_Screens, &QAction::trigger);
connect(hotkey_registry.GetHotkey("Main Window", "Rotate Screens Upright", render_window),
&QShortcut::activated, ui.action_Screen_Layout_Upright_Screens, &QAction::trigger);
connect(hotkey_registry.GetHotkey("Main Window", "Toggle Screen Layout", render_window),
&QShortcut::activated, this, &GMainWindow::ToggleScreenLayout);
connect(hotkey_registry.GetHotkey("Main Window", "Fullscreen", render_window),
@ -607,6 +609,9 @@ void GMainWindow::ConnectMenuEvents() {
ui.action_Screen_Layout_Swap_Screens->setShortcut(
hotkey_registry.GetHotkey("Main Window", "Swap Screens", this)->key());
ui.action_Screen_Layout_Swap_Screens->setShortcutContext(Qt::WidgetWithChildrenShortcut);
ui.action_Screen_Layout_Upright_Screens->setShortcut(
hotkey_registry.GetHotkey("Main Window", "Rotate Screens Upright", this)->key());
ui.action_Screen_Layout_Upright_Screens->setShortcutContext(Qt::WidgetWithChildrenShortcut);
connect(ui.action_Fullscreen, &QAction::triggered, this, &GMainWindow::ToggleFullscreen);
connect(ui.action_Screen_Layout_Default, &QAction::triggered, this,
&GMainWindow::ChangeScreenLayout);