make webinterface translatable. there are around 20 short strings, all with context...
[kdenetwork.git] / kopete / libkopete / kopeteidletimer.h
blob67d07b6b2258a936928deaae0951f6d43d274089
1 /*
2 kopeteidletimer.h - Kopete Idle Timer
4 Copyright (c) 2002 by Hendrik vom Lehn <hvl@linux-4-ever.de>
5 Copyright (c) 2003 by Olivier Goffart <ogoffart@kde.org>
6 Copyright (c) 2008 by Roman Jarosz <kedgedev@centrum.cz>
7 Kopete (c) 2002-2008 by the Kopete developers <kopete-devel@kde.org>
9 *************************************************************************
10 * *
11 * This library is free software; you can redistribute it and/or *
12 * modify it under the terms of the GNU Lesser General Public *
13 * License as published by the Free Software Foundation; either *
14 * version 2 of the License, or (at your option) any later version. *
15 * *
16 *************************************************************************
18 #ifndef KOPETEIDLETIMER_H
19 #define KOPETEIDLETIMER_H
21 #include <QtCore/QObject>
23 #include "kopete_export.h"
25 namespace Kopete
28 /**
29 * IdleTimer handles global idle time and allows to register idle timeout notifications
31 * IdleTimer is a singleton, you may uses it with @ref IdleTimer::self()
33 class KOPETE_EXPORT IdleTimer : public QObject
35 Q_OBJECT
37 public:
38 /**
39 * Get the only instance of IdleTimer
40 * @return IdleTimer single instance
42 static IdleTimer *self();
44 ~IdleTimer();
46 /**
47 * @brief Time in seconds the user has been idle
49 int idleTime();
51 public Q_SLOTS:
52 /**
53 * @brief Register new timeout notification
54 * \param idleSeconds the idle notification time period
55 * \param receiver the object that receives the timeout notification.
56 * \param memberActive the slot that is called when user has changed its state from idle to active.
57 * \param memberIdle the slot that is called when user was idle for @param idleSeconds seconds.
59 void registerTimeout( int idleSeconds, QObject * receiver,
60 const char * memberActive, const char * memberIdle );
62 /**
63 * removes all registered timeout notifications for this object
65 void unregisterTimeout( QObject *receiver );
67 private slots:
68 void slotTimerTimeout();
70 private:
71 IdleTimer();
73 /**
74 * @brief Check for activity using X11 methods
75 * @return true if activity was detected, otherwise false
77 * Attempt to detect activity using a variety of X11 methods.
79 bool isActivity();
81 static IdleTimer *instance;
83 class Private;
84 Private *d;
89 #endif