mirror of
https://github.com/fergalmoran/flameshot.git
synced 2025-12-22 17:59:25 +00:00
Added a gui --selection option to print out the geometry of the selection.
Fixes #425.
This commit is contained in:
committed by
borgmanJeremy
parent
8b51af2010
commit
05c2bc6ae7
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user