KIdleTime library

Dario Freddi drf54321 at gmail.com
Sun Jul 5 17:23:18 BST 2009


On Sunday 05 July 2009 18:14:25 Tom Albers wrote:
> Op Sunday 05 July 2009 17:30 schreef u:
> > I will also add a backend for Windows and Mac OS, guidance is warmly
> > welcome.
> >
> > There is a draft API doc as well, the relevant class is in kidle.h,
> > implemented as a singleton.
>
> Great initiative!

Thanks :)

>
> If you manage to get Windows and Mac OS support, I'm interested to use it
> within RSIBreak.

I'm trying to get a KDE Dev environment on Windows right now, since I probably 
found how to do that. I still need Mac guidance.

> RSIBreak is mainly interested in how active the user is
> (the opposite of what the lib does now), but basically RSIBreak would need
> a low level API. Ideally I would like to know every second how many seconds
> the user has been active/idle. Is it possible to facilitate something like
> that?

Uhm, I'm not sure if I got you here. Basically, you could start a QTimer every 
second, that polls KIdleTime::instance()->idleTime(). If the return value of 
idleTime() is inferior to 1000 (1 second), then the user has been active in 
that second. Otherwise, the user has been inactive. Is that what you were 
looking for?

>
> Toma

-- 
-------------------

Dario Freddi
KDE Developer
GPG Key Signature: 511A9A3B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090705/01ada2b8/attachment.sig>


More information about the kde-core-devel mailing list