summaryrefslogtreecommitdiffstats
path: root/ksnapshot/ksnapshot.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2023-11-24 23:25:16 +0200
committerMavridis Philippe <mavridisf@gmail.com>2023-11-25 13:31:17 +0200
commitd7130aacf9ea286af38bb61578fe32a0e4ea2642 (patch)
tree6ace13b5c0df83186d94c1c8006d973598351e7e /ksnapshot/ksnapshot.cpp
parent60716f5af0920804783f44ca88664dcd403e4041 (diff)
downloadtdegraphics-d7130aacf9ea286af38bb61578fe32a0e4ea2642.tar.gz
tdegraphics-d7130aacf9ea286af38bb61578fe32a0e4ea2642.zip
ksnapshot: add setPixmap DCOP call
Can be useful to integrate KSnapshot with applications that can take their own screenshots better (e.g. a media player can use a single frame from a video instead of a lower-quality real screen grab). Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'ksnapshot/ksnapshot.cpp')
-rw-r--r--ksnapshot/ksnapshot.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ksnapshot/ksnapshot.cpp b/ksnapshot/ksnapshot.cpp
index 4b18d30e..be4fed35 100644
--- a/ksnapshot/ksnapshot.cpp
+++ b/ksnapshot/ksnapshot.cpp
@@ -589,6 +589,11 @@ void KSnapshot::setURL( const TQString &url )
updateCaption();
}
+void KSnapshot::setPixmap(const TQPixmap &newImage) {
+ snapshot = newImage;
+ updatePreview();
+}
+
void KSnapshot::setGrabMode( int m )
{
mainWidget->setMode( m );