Added a gui --selection option to print out the geometry of the selection.

Fixes #425.
This commit is contained in:
Jeremy Fleischman
2018-12-14 22:03:13 -08:00
committed by borgmanJeremy
parent 8b51af2010
commit 05c2bc6ae7
10 changed files with 80 additions and 22 deletions

View File

@@ -170,7 +170,8 @@ void Controller::startScreenGrab(const uint id, const int screenNumber)
}
QPixmap p(ScreenGrabber().grabScreen(n, ok));
if (ok) {
emit captureTaken(id, p);
QRect selection; // `flameshot screen` does not support --selection
emit captureTaken(id, p, selection);
} else {
emit captureFailed(id);
}
@@ -325,13 +326,14 @@ void Controller::startFullscreenCapture(const uint id)
bool ok = true;
QPixmap p(ScreenGrabber().grabEntireDesktop(ok));
if (ok) {
emit captureTaken(id, p);
QRect selection; // `flameshot full` does not support --selection
emit captureTaken(id, p, selection);
} else {
emit captureFailed(id);
}
}
void Controller::handleCaptureTaken(uint id, QPixmap p)
void Controller::handleCaptureTaken(uint id, QPixmap p, QRect selection)
{
auto it = m_requestMap.find(id);
if (it != m_requestMap.end()) {