Added feature & config to auto-save a screenshot after copying it

This commit is contained in:
Joseph Charamut
2019-05-01 12:56:45 -04:00
parent cb59757848
commit d303c9dd62
5 changed files with 96 additions and 0 deletions

View File

@@ -32,6 +32,11 @@ void ScreenshotSaver::saveToClipboard(const QPixmap &capture) {
SystemNotification().sendMessage(
QObject::tr("Capture saved to clipboard"));
QApplication::clipboard()->setPixmap(capture);
if (ConfigHandler().saveAfterCopyValue()) {
if (!ConfigHandler().saveAfterCopyPathValue().isEmpty()) {
saveToFilesystem(capture, ConfigHandler().saveAfterCopyPathValue());
}
}
}
bool ScreenshotSaver::saveToFilesystem(const QPixmap &capture,