10
#include <dcopclient.h>
11
#include <kglobalsettings.h>
12
#include <kdialogbase.h>
16
class KSnapshotWidget;
18
class KSnapshotThumb : public QLabel
23
KSnapshotThumb(QWidget *parent, const char *name = 0)
24
: QLabel(parent, name)
26
setAlignment(AlignHCenter | AlignVCenter);
28
virtual ~KSnapshotThumb() {}
34
void mousePressEvent(QMouseEvent * e)
39
void mouseMoveEvent(QMouseEvent * e)
41
if (mClickPt != QPoint(0, 0) &&
42
(e->pos() - mClickPt).manhattanLength() > KGlobalSettings::dndEventDelay())
44
mClickPt = QPoint(0, 0);
49
void mouseReleaseEvent(QMouseEvent * /*e*/)
51
mClickPt = QPoint(0, 0);
57
class KSnapshot : public KDialogBase
59
typedef KDialogBase super;
63
KSnapshot(QWidget *parent= 0, const char *name= 0);
66
enum CaptureMode { FullScreen=0, WindowUnderCursor=1, Region=2 };
68
bool save( const QString &filename );
69
bool save( const KURL& url );
71
QString url() const { return filename.url(); }
80
void slotMovePointer( int x, int y );
82
void setTime(int newTime);
83
void setURL(const QString &newURL);
84
void setGrabMode( int m );
91
void reject() { close(); }
92
bool eventFilter( QObject*, QEvent* );
96
void slotDragSnapshot();
97
void slotRegionGrabbed( const QPixmap & );
100
void updatePreview();
102
void autoincFilename();
108
KSnapshotWidget *mainWidget;
109
RegionGrabber *rgnGrab;
114
#endif // KSNAPSHOT_H