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