summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ksnapshot/ksnapshot.cpp5
-rw-r--r--ksnapshot/ksnapshot.h1
-rw-r--r--ksnapshot/ksnapshotiface.h5
3 files changed, 11 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 );
diff --git a/ksnapshot/ksnapshot.h b/ksnapshot/ksnapshot.h
index b84e8c18..47cbe47e 100644
--- a/ksnapshot/ksnapshot.h
+++ b/ksnapshot/ksnapshot.h
@@ -118,6 +118,7 @@ protected slots:
void setTime(int newTime);
void setURL(const TQString &newURL);
void setGrabMode( int m );
+ void setPixmap(const TQPixmap &newImage);
void exit();
protected:
diff --git a/ksnapshot/ksnapshotiface.h b/ksnapshot/ksnapshotiface.h
index 5136b0ba..e8ac5158 100644
--- a/ksnapshot/ksnapshotiface.h
+++ b/ksnapshot/ksnapshotiface.h
@@ -12,6 +12,7 @@
#define __KS_IFACE_H
#include <dcopobject.h>
+#include <tqpixmap.h>
class KSnapshotIface : virtual public DCOPObject
{
@@ -60,6 +61,10 @@ class KSnapshotIface : virtual public DCOPObject
/** Exit KSnapshot **/
virtual void exit() = 0;
+
+ /** Set image, for applications which want to make use of KSnapshot's UI
+ and interface with their own images */
+ virtual void setPixmap(const TQPixmap &newImage) = 0;
};
#endif