Merge pull request #2595 from Cacodemon345/qt-open-screenshots-folder
qt: Add ability to open screenshots folder
This commit is contained in:
@@ -74,6 +74,7 @@ extern "C" {
|
||||
#include <QOpenGLContext>
|
||||
#include <QScreen>
|
||||
#include <QString>
|
||||
#include <QDir>
|
||||
|
||||
#include <array>
|
||||
#include <unordered_map>
|
||||
@@ -2122,3 +2123,10 @@ void MainWindow::on_actionShow_non_primary_monitors_triggered()
|
||||
blitDummied = false;
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_actionOpen_screenshots_folder_triggered()
|
||||
{
|
||||
QDir(QString(usr_path) + QString("/screenshots/")).mkpath(".");
|
||||
QDesktopServices::openUrl(QUrl(QString("file:///") + usr_path + QString("/screenshots/")));
|
||||
}
|
||||
|
||||
|
@@ -129,6 +129,8 @@ protected:
|
||||
private slots:
|
||||
void on_actionShow_non_primary_monitors_triggered();
|
||||
|
||||
void on_actionOpen_screenshots_folder_triggered();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
std::unique_ptr<MachineStatus> status;
|
||||
|
@@ -91,6 +91,8 @@
|
||||
<addaction name="actionEnd_trace"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionMCA_devices"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionOpen_screenshots_folder"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuView">
|
||||
<property name="title">
|
||||
@@ -778,6 +780,11 @@
|
||||
<number>6</number>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpen_screenshots_folder">
|
||||
<property name="text">
|
||||
<string>Open screenshots folder...</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
Reference in New Issue
Block a user