1 //===========================================================================
3 // This file is part of the KDE project
5 // Copyright 1999 Martin R. Jones <mjones@kde.org>
8 #ifndef __XAUTOLOCK_H__
9 #define __XAUTOLOCK_H__
15 //===========================================================================
17 // Detect user inactivity.
18 // Named XAutoLock after the program that it is based on.
20 class XAutoLock
: public QWidget
27 //-----------------------------------------------------------------------
29 // The time in seconds of continuous inactivity.
30 // Need to call start() again afterwards.
32 void setTimeout(int t
);
36 //-----------------------------------------------------------------------
38 // Start watching Activity
42 //-----------------------------------------------------------------------
44 // Stop watching Activity
48 //-----------------------------------------------------------------------
50 // Should be called only from a slot connected to the timeout() signal. Will
51 // result in the timeout() signal being emitted again with a delay (i.e. postponed).
58 void setTrigger( time_t );
60 bool ignoreWindow( WId
);
68 virtual void timerEvent(QTimerEvent
*ev
);
69 virtual bool x11Event( XEvent
* );
76 time_t mLastTimeout
, mLastReset
;