File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 22<node >
33 <interface name =" org.flameshot.Flameshot" >
44
5+ <!--
6+ captureScreen:
7+
8+ Open the GUI screenshot capture tool.
9+ -->
10+ <method name =" captureScreen" />
11+
512 <!--
613 attachPin:
714 @data: Byte array containing the screenshot and geometry information.
Original file line number Diff line number Diff line change 22// SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors
33
44#include " flameshotdbusadapter.h"
5+ #include " core/flameshot.h"
56#include " core/flameshotdaemon.h"
67
78FlameshotDBusAdapter::FlameshotDBusAdapter (QObject* parent)
@@ -10,6 +11,11 @@ FlameshotDBusAdapter::FlameshotDBusAdapter(QObject* parent)
1011
1112FlameshotDBusAdapter::~FlameshotDBusAdapter () = default ;
1213
14+ void FlameshotDBusAdapter::captureScreen ()
15+ {
16+ Flameshot::instance ()->gui (CaptureRequest (CaptureRequest::GRAPHICAL_MODE));
17+ }
18+
1319void FlameshotDBusAdapter::attachScreenshotToClipboard (const QByteArray& data)
1420{
1521 FlameshotDaemon::instance ()->attachScreenshotToClipboard (data);
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class FlameshotDBusAdapter : public QDBusAbstractAdaptor
1515 virtual ~FlameshotDBusAdapter ();
1616
1717public slots:
18+ Q_NOREPLY void captureScreen ();
1819 Q_NOREPLY void attachScreenshotToClipboard (const QByteArray& data);
1920 Q_NOREPLY void attachTextToClipboard (const QString& text,
2021 const QString& notification);
You can’t perform that action at this time.
0 commit comments