diff options
Diffstat (limited to 'ksnapshot/ksnapshot.h')
| -rw-r--r-- | ksnapshot/ksnapshot.h | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/ksnapshot/ksnapshot.h b/ksnapshot/ksnapshot.h index 47cbe47e..45734f88 100644 --- a/ksnapshot/ksnapshot.h +++ b/ksnapshot/ksnapshot.h @@ -4,8 +4,9 @@ #include <tqbitmap.h> #include <tqcursor.h> +#include <tqdatetime.h> +#include <tqdragobject.h> #include <tqlabel.h> -#include <tqmap.h> #include <tqpainter.h> #include <tqpixmap.h> #include <tqstyle.h> @@ -102,6 +103,7 @@ public: bool save( const TQString &filename ); TQString url() const { return filename.url(); } + TQString localFile(); protected slots: void slotAboutToQuit(); @@ -112,7 +114,6 @@ protected slots: void slotPrint(); void slotOpenWith(int id); void slotOpenWithKP(); - void slotExternalAppClosed(TDEProcess *process); void slotMovePointer( int x, int y ); void setTime(int newTime); @@ -134,7 +135,7 @@ private slots: void updateCaption(); void updatePreview(); void slotRegionGrabbed( const TQPixmap & ); - void slotWindowGrabbed( const TQPixmap & ); + void newSnapshot( const TQPixmap & ); private: bool save( const KURL& url ); @@ -143,6 +144,8 @@ private: void autoincFilename(); int grabMode(); int timeout(); + TQString saveTempFile(); + void setLocalFilePath(TQString fp); TQPixmap snapshot; TQTimer grabTimer; @@ -151,11 +154,29 @@ private: KURL filename; KSnapshotWidget *mainWidget; RegionGrabber *rgnGrab; + TQDateTime timestamp; bool modified; TDETrader::OfferList openWithOffers; - TQMap<TDEProcess*, KTempFile*> m_tmpFiles; + TQString localFilePath; + TQDateTime currentFilePathTimestamp; + TQValueList<TQString> tempFiles; TQPoint oldWinPos; }; + +/** + * A small wrapper around TQImageDrag that also passes text/uri-list with a + * temporary file as a fallback variant. + */ +class SnapshotDrag : public TQImageDrag { + TQ_OBJECT + KSnapshot *ksnap; + TQValueList<TQCString> formats; +public: + SnapshotDrag( TQImage image, KSnapshot * dragSource, const char * name = 0 ); + const char * format(int i) const; + TQByteArray encodedData(const char* format) const; +}; + #endif // KSNAPSHOT_H |
