KIdleTime

xscreensaverbasedpoller.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.0-only
5  */
6 
7 #ifndef XSCREENSAVERBASEDPOLLER_H
8 #define XSCREENSAVERBASEDPOLLER_H
9 
10 #include "widgetbasedpoller.h"
11 
12 #include "screensaver_interface.h"
13 
14 class XScreensaverBasedPoller: public WidgetBasedPoller
15 {
16  Q_OBJECT
17  Q_PLUGIN_METADATA(IID "org.kde.kidletime.AbstractSystemPoller" FILE "xcb.json")
18  Q_INTERFACES(AbstractSystemPoller)
19 
20 public:
21  explicit XScreensaverBasedPoller(QObject *parent = nullptr);
22  ~XScreensaverBasedPoller() override;
23 
24 public Q_SLOTS:
25  void simulateUserActivity() override;
26 
27 private:
28  bool additionalSetUp() override;
29 
30 private Q_SLOTS:
31  void screensaverActivated(bool activated);
32  int getIdleTime() override;
33 
34 private:
35  OrgFreedesktopScreenSaverInterface *m_screenSaverIface;
36 };
37 
38 #endif /* XSCREENSAVERBASEDPOLLER_H_ */
Q_OBJECTQ_OBJECT
Q_INTERFACES(...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 7 2020 22:47:43 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.