Qt: Add screenshot button

This commit is contained in:
Connor McLaughlin
2020-03-16 00:06:39 +10:00
parent ffb760c79d
commit 282998d0bb
4 changed files with 24 additions and 0 deletions

View File

@ -378,6 +378,7 @@ void MainWindow::updateEmulationActions(bool starting, bool running)
m_ui.actionReset->setDisabled(starting || !running);
m_ui.actionPause->setDisabled(starting || !running);
m_ui.actionChangeDisc->setDisabled(starting || !running);
m_ui.actionScreenshot->setDisabled(starting || !running);
m_ui.menuChangeDisc->setDisabled(starting || !running);
m_ui.actionSaveState->setDisabled(starting || !running);
@ -434,6 +435,7 @@ void MainWindow::connectSignals()
connect(m_ui.actionPowerOff, &QAction::triggered, m_host_interface, &QtHostInterface::powerOffSystem);
connect(m_ui.actionReset, &QAction::triggered, m_host_interface, &QtHostInterface::resetSystem);
connect(m_ui.actionPause, &QAction::toggled, m_host_interface, &QtHostInterface::pauseSystem);
connect(m_ui.actionScreenshot, &QAction::triggered, m_host_interface, &QtHostInterface::saveScreenshot);
connect(m_ui.actionLoadState, &QAction::triggered, this, [this]() { m_ui.menuLoadState->exec(QCursor::pos()); });
connect(m_ui.actionSaveState, &QAction::triggered, this, [this]() { m_ui.menuSaveState->exec(QCursor::pos()); });
connect(m_ui.actionExit, &QAction::triggered, this, &MainWindow::close);