Add Screenshot feature to Unix

This commit is contained in:
Mahmood(Thunder07) 2017-04-09 06:50:07 +01:00
parent f1290bea8a
commit 5c98e27a97
3 changed files with 19 additions and 0 deletions

View File

@ -19,6 +19,7 @@
#include <boost/version.hpp>
#include "PreferenceDefs.h"
#include "ScreenShotUtils.h"
#include "ui_mainwindow.h"
#include "vfsmanagerdialog.h"
@ -459,3 +460,13 @@ void MainWindow::on_actionController_Manager_triggered()
ControllerConfigDialog ccd;
ccd.exec();
}
void MainWindow::on_actionCapture_Screen_triggered()
{
CScreenShotUtils::TriggerGetScreenshot(g_virtualMachine,
[&](int res, const char* msg)->void
{
m_msgLabel->setText(msg);
}
);
}

View File

@ -97,6 +97,7 @@ private slots:
void on_actionMemory_Card_Manager_triggered();
void on_actionVFS_Manager_triggered();
void on_actionController_Manager_triggered();
void on_actionCapture_Screen_triggered();
};
#endif // MAINWINDOW_H

View File

@ -85,6 +85,8 @@
<addaction name="actionPause_Resume"/>
<addaction name="actionPause_when_focus_is_lost"/>
<addaction name="actionReset"/>
<addaction name="separator"/>
<addaction name="actionCapture_Screen"/>
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
@ -181,6 +183,11 @@
<string>Controller Manager...</string>
</property>
</action>
<action name="actionCapture_Screen">
<property name="text">
<string>Capture Screen</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>