KIdleTime

windowspoller.h
1 /* This file is part of the KDE libraries
2  * SPDX-FileCopyrightText: 2009 Dario Freddi <drf at kde.org>
3  *
4  * SPDX-License-Identifier: LGPL-2.1-or-later
5  */
6 
7 #ifndef WINDOWSPOLLER_H
8 #define WINDOWSPOLLER_H
9 
10 #include "kwindowbasedidletimepoller_p.h"
11 
12 class QTimer;
13 
14 class WindowsPoller : public KWindowBasedIdleTimePoller
15 {
16  Q_OBJECT
17  Q_PLUGIN_METADATA(IID KAbstractIdleTimePoller_iid FILE "windows.json")
18  Q_INTERFACES(KAbstractIdleTimePoller)
19 
20 public:
21  WindowsPoller(QObject *parent = 0);
22  virtual ~WindowsPoller();
23 
24 public Q_SLOTS:
25  void simulateUserActivity();
26  void catchIdleEvent();
27  void stopCatchingIdleEvents();
28 
29 private:
30  bool additionalSetUp();
31 
32 private Q_SLOTS:
33  int getIdleTime();
34  void checkForIdle();
35 
36 private:
37  QTimer *m_idleTimer;
38 };
39 
40 #endif /* WINDOWSPOLLER_H */
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 04:07:39 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.