1 //===========================================================================
3 // This file is part of the KDE project
5 // Copyright (c) 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.
31 void setTimeout(int t
);
35 //-----------------------------------------------------------------------
37 // Start watching Activity
41 //-----------------------------------------------------------------------
43 // Stop watching Activity
47 //-----------------------------------------------------------------------
49 // Should be called only from a slot connected to the timeout() signal. Will
50 // result in the timeout() signal being emitted again with a delay (i.e. postponed).
57 void setTrigger( time_t );
59 bool ignoreWindow( WId
);
67 virtual void timerEvent(QTimerEvent
*ev
);
68 virtual bool x11Event( XEvent
* );
75 time_t mLastTimeout
, mLastReset
;