DolphinQt: Add 'Screenshot' button.

This commit is contained in:
waddlesplash 2015-09-12 13:20:45 -04:00
parent db8b50cf7e
commit 7c13021627
2 changed files with 15 additions and 0 deletions

View File

@ -76,6 +76,9 @@ DMainWindow::DMainWindow(QWidget* parent_widget)
connect(m_game_tracker, &DGameTracker::StartGame, this, &DMainWindow::OnPlay); connect(m_game_tracker, &DGameTracker::StartGame, this, &DMainWindow::OnPlay);
connect(m_ui->actionStop, &QAction::triggered, this, &DMainWindow::OnStop); connect(m_ui->actionStop, &QAction::triggered, this, &DMainWindow::OnStop);
connect(m_ui->actionReset, &QAction::triggered, this, &DMainWindow::OnReset); connect(m_ui->actionReset, &QAction::triggered, this, &DMainWindow::OnReset);
connect(m_ui->actionScreenshot, &QAction::triggered, this, [&]() {
Core::SaveScreenShot();
});
connect(m_ui->actionWebsite, &QAction::triggered, this, [&]() { connect(m_ui->actionWebsite, &QAction::triggered, this, [&]() {
QDesktopServices::openUrl(QUrl(SL("https://dolphin-emu.org/"))); QDesktopServices::openUrl(QUrl(SL("https://dolphin-emu.org/")));
@ -361,4 +364,5 @@ void DMainWindow::UpdateIcons()
{ {
// Play/Pause is handled in OnCoreStateChanged(). // Play/Pause is handled in OnCoreStateChanged().
m_ui->actionStop->setIcon(Resources::GetIcon(Resources::TOOLBAR_STOP)); m_ui->actionStop->setIcon(Resources::GetIcon(Resources::TOOLBAR_STOP));
m_ui->actionScreenshot->setIcon(Resources::GetIcon(Resources::TOOLBAR_SCREENSHOT));
} }

View File

@ -52,6 +52,8 @@
<addaction name="actionPlay"/> <addaction name="actionPlay"/>
<addaction name="actionStop"/> <addaction name="actionStop"/>
<addaction name="actionReset"/> <addaction name="actionReset"/>
<addaction name="separator"/>
<addaction name="actionScreenshot"/>
</widget> </widget>
<widget class="QMenu" name="mnuOptions"> <widget class="QMenu" name="mnuOptions">
<property name="title"> <property name="title">
@ -119,6 +121,7 @@
</attribute> </attribute>
<addaction name="actionPlay"/> <addaction name="actionPlay"/>
<addaction name="actionStop"/> <addaction name="actionStop"/>
<addaction name="actionScreenshot"/>
</widget> </widget>
<action name="actionWebsite"> <action name="actionWebsite">
<property name="text"> <property name="text">
@ -236,6 +239,14 @@
<string>&amp;Reset</string> <string>&amp;Reset</string>
</property> </property>
</action> </action>
<action name="actionScreenshot">
<property name="text">
<string>Screenshot</string>
</property>
<property name="iconVisibleInMenu">
<bool>false</bool>
</property>
</action>
</widget> </widget>
<resources/> <resources/>
<connections/> <connections/>