Permalink
Browse files

Merge pull request #6793 from spycrab/qt_hotkeys

Qt: Implement missing hotkeys
  • Loading branch information...
spycrab committed May 9, 2018
2 parents 56d7b7f + ce32447 commit 5cd02f085314d6b04203e326b4de9531dc601d1a
@@ -138,6 +138,17 @@ void HotkeyScheduler::Run()
if (!Core::IsRunningAndStarted())
continue;
if (IsHotkey(HK_OPEN))
emit Open();
// Disc
if (IsHotkey(HK_EJECT_DISC))
emit EjectDisc();
if (IsHotkey(HK_CHANGE_DISC))
emit ChangeDisc();
// Fullscreen
if (IsHotkey(HK_FULLSCREEN))
emit FullScreenHotkey();
@@ -20,6 +20,10 @@ class HotkeyScheduler : public QObject
void Start();
void Stop();
signals:
void Open();
void EjectDisc();
void ChangeDisc();
void ExitHotkey();
void FullScreenHotkey();
void StopHotkey();
@@ -334,6 +334,9 @@ void MainWindow::ConnectMenuBar()
void MainWindow::ConnectHotkeys()
{
connect(m_hotkey_scheduler, &HotkeyScheduler::Open, this, &MainWindow::Open);
connect(m_hotkey_scheduler, &HotkeyScheduler::ChangeDisc, this, &MainWindow::ChangeDisc);
connect(m_hotkey_scheduler, &HotkeyScheduler::EjectDisc, this, &MainWindow::EjectDisc);
connect(m_hotkey_scheduler, &HotkeyScheduler::ExitHotkey, this, &MainWindow::close);
connect(m_hotkey_scheduler, &HotkeyScheduler::TogglePauseHotkey, this, &MainWindow::TogglePause);
connect(m_hotkey_scheduler, &HotkeyScheduler::StopHotkey, this, &MainWindow::RequestStop);

0 comments on commit 5cd02f0

Please sign in to comment.