diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,4 @@
CMakeLists.txt.user*
*.unc-backup*
.cmake/
+.vscode/
\ No newline at end of file
diff --git a/dbus/org.kde.Spectacle.xml b/dbus/org.kde.Spectacle.xml
--- a/dbus/org.kde.Spectacle.xml
+++ b/dbus/org.kde.Spectacle.xml
@@ -98,6 +98,86 @@
+
+
+
+ Whether to include an image of the mouse pointer.
+
+
+
+
+ Takes a full-screen screenshot and copies to the Clipboard and doesn't save to file.
+ If Spectacle was started via D-Bus, it takes a screenshot in the background without spawning the GUI and exits after the shot has been taken.
+
+
+
+
+
+
+
+ Whether to include an image of the mouse pointer.
+
+
+
+
+ Takes a screenshot of the current screen and copies to the Clipboard and doesn't save to file.
+ If Spectacle was started via D-Bus, it takes a screenshot in the background without spawning the GUI and exits after the shot has been taken.
+
+
+
+
+
+
+
+ Whether to include the window titlebars and frames.
+
+
+
+
+ Whether to include an image of the mouse pointer.
+
+
+
+
+ Takes a screenshot of the window that currently has window focus and copies to the Clipboard and doesn't save to file.
+ If Spectacle was started via D-Bus, it takes a screenshot in the background without spawning the GUI and exits after the shot has been taken.
+
+
+
+
+
+
+
+ Whether to include the window titlebars and frames.
+
+
+
+
+ Whether to include an image of the mouse pointer.
+
+
+
+
+ Takes a screenshot of the window that is currently under the mouse cursor and copies to the Clipboard and doesn't save to file.
+ If Spectacle was started via D-Bus, it takes a screenshot in the background without spawning the GUI and exits after the shot has been taken.
+
+
+
+
+
+
+
+ Whether to include an image of the mouse pointer.
+
+
+
+
+ Takes a screenshot of a rectangular region and copies to the Clipboard and doesn't save to file.
+ The user is prompted to select the region to capture. If Spectacle was started via D-Bus, it exits after the shot has been taken.
+
+
+
+
diff --git a/src/SpectacleCore.h b/src/SpectacleCore.h
--- a/src/SpectacleCore.h
+++ b/src/SpectacleCore.h
@@ -80,6 +80,7 @@
void doStartDragAndDrop();
void doNotify(const QUrl &theSavedAt);
void doCopyPath(const QUrl &savedAt);
+ void updateCopyTopClipboard(bool theCopyToClipboard);
private:
diff --git a/src/SpectacleCore.cpp b/src/SpectacleCore.cpp
--- a/src/SpectacleCore.cpp
+++ b/src/SpectacleCore.cpp
@@ -154,6 +154,11 @@
mFileNameUrl = QUrl::fromUserInput(filename);
}
+void SpectacleCore::updateCopyTopClipboard(bool theCopyToClipboard)
+{
+ mCopyToClipboard = theCopyToClipboard;
+}
+
// Slots
void SpectacleCore::dbusStartAgent()
diff --git a/src/SpectacleDBusAdapter.h b/src/SpectacleDBusAdapter.h
--- a/src/SpectacleDBusAdapter.h
+++ b/src/SpectacleDBusAdapter.h
@@ -49,6 +49,23 @@
" \n"
" \n"
" \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
" \n"
" \n"
" \n"
@@ -73,6 +90,11 @@
Q_NOREPLY void ActiveWindow(bool includeWindowDecorations, bool includeMousePointer);
Q_NOREPLY void WindowUnderCursor(bool includeWindowDecorations, bool includeMousePointer);
Q_NOREPLY void RectangularRegion(bool includeMousePointer);
+ Q_NOREPLY void FullScreenCopyToClip(bool includeMousePointer);
+ Q_NOREPLY void CurrentScreenCopyToClip(bool includeMousePointer);
+ Q_NOREPLY void ActiveWindowCopyToClip(bool includeWindowDecorations, bool includeMousePointer);
+ Q_NOREPLY void WindowUnderCursorCopyToClip(bool includeWindowDecorations, bool includeMousePointer);
+ Q_NOREPLY void RectangularRegionCopyToClip(bool includeMousePointer);
Q_SIGNALS:
diff --git a/src/SpectacleDBusAdapter.cpp b/src/SpectacleDBusAdapter.cpp
--- a/src/SpectacleDBusAdapter.cpp
+++ b/src/SpectacleDBusAdapter.cpp
@@ -62,3 +62,33 @@
{
parent()->takeNewScreenshot(Spectacle::CaptureMode::RectangularRegion, 0, includeMousePointer, false);
}
+
+Q_NOREPLY void SpectacleDBusAdapter::FullScreenCopyToClip(bool includeMousePointer)
+{
+ parent()->updateCopyTopClipboard(true);
+ parent()->takeNewScreenshot(Spectacle::CaptureMode::AllScreens, 0, includeMousePointer, true);
+}
+
+Q_NOREPLY void SpectacleDBusAdapter::CurrentScreenCopyToClip(bool includeMousePointer)
+{
+ parent()->updateCopyTopClipboard(true);
+ parent()->takeNewScreenshot(Spectacle::CaptureMode::CurrentScreen, 0, includeMousePointer, true);
+}
+
+Q_NOREPLY void SpectacleDBusAdapter::ActiveWindowCopyToClip(bool includeWindowDecorations, bool includeMousePointer)
+{
+ parent()->updateCopyTopClipboard(true);
+ parent()->takeNewScreenshot(Spectacle::CaptureMode::ActiveWindow, 0, includeMousePointer, includeWindowDecorations);
+}
+
+Q_NOREPLY void SpectacleDBusAdapter::WindowUnderCursorCopyToClip(bool includeWindowDecorations, bool includeMousePointer)
+{
+ parent()->updateCopyTopClipboard(true);
+ parent()->takeNewScreenshot(Spectacle::CaptureMode::WindowUnderCursor, 0, includeMousePointer, includeWindowDecorations);
+}
+
+Q_NOREPLY void SpectacleDBusAdapter::RectangularRegionCopyToClip(bool includeMousePointer)
+{
+ parent()->updateCopyTopClipboard(true);
+ parent()->takeNewScreenshot(Spectacle::CaptureMode::RectangularRegion, 0, includeMousePointer, false);
+}