KSnapshot: add setPixmap DCOP call #77

Merged
blu.256 merged 1 commits from feat/ksnapshot-dcop-set-pixmap into master 5 months ago
Collaborator

This PR adds a new DCOP call to the KSnapshot interface, setPixmap(TQPixmap &newImage).

This can be useful to integrate KSnapshot with applications that can take their own screenshots better.

For example, a media player can use a single frame from a video instead of a lower-quality real screen grab. (I plan to implement this feature with the Kaffeine MPV backend). So the media player would launch an instance of KSnapshot and pass the frame via DCOP to the newly-launched instance. The user can then do with the shot whatever they would do with an ordinary screenshot, which is more convenient to the end user than just showing a save dialog, or -even worse- taking the liberty of saving the file wherever the player decides.

This PR adds a new DCOP call to the KSnapshot interface, `setPixmap(TQPixmap &newImage)`. This can be useful to integrate KSnapshot with applications that can take their own screenshots better. For example, a media player can use a single frame from a video instead of a lower-quality real screen grab. (I plan to implement this feature with the Kaffeine MPV backend). So the media player would launch an instance of KSnapshot and pass the frame via DCOP to the newly-launched instance. The user can then do with the shot whatever they would do with an ordinary screenshot, which is more convenient to the end user than just showing a save dialog, or -even worse- taking the liberty of saving the file wherever the player decides.
blu.256 added this to the R14.1.2 release milestone 5 months ago
blu.256 added 1 commit 5 months ago
20d9b1e7e2
ksnapshot: add setPixmap DCOP call
blu.256 added the PR/rfc label 5 months ago
blu.256 requested review from Owners 5 months ago
MicheleC requested changes 5 months ago
MicheleC left a comment
Owner

Nice idea Philippe, it works very well!

Small suggestion for improvement: the function argument should be const TQPixmap &newImage, since the image passed to the function is not modified.

Nice idea Philippe, it works very well! Small suggestion for improvement: the function argument should be `const TQPixmap &newImage`, since the image passed to the function is not modified.
blu.256 force-pushed feat/ksnapshot-dcop-set-pixmap from 20d9b1e7e2 to ea96ef1294 5 months ago
blu.256 requested review from MicheleC 5 months ago
Poster
Collaborator

Nice idea Philippe, it works very well!

Small suggestion for improvement: the function argument should be const TQPixmap &newImage, since the image passed to the function is not modified.

Done.

> Nice idea Philippe, it works very well! > > Small suggestion for improvement: the function argument should be `const TQPixmap &newImage`, since the image passed to the function is not modified. Done.
blu.256 force-pushed feat/ksnapshot-dcop-set-pixmap from ea96ef1294 to d7130aacf9 5 months ago
MicheleC approved these changes 5 months ago
MicheleC left a comment
Owner

Looks good, thanks.

Looks good, thanks.
blu.256 merged commit d7130aacf9 into master 5 months ago
blu.256 deleted branch feat/ksnapshot-dcop-set-pixmap 5 months ago
MicheleC removed the PR/rfc label 5 months ago

Reviewers

MicheleC approved these changes 5 months ago
The pull request has been merged as d7130aacf9.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tdegraphics#77
Loading…
There is no content yet.