Changeset View
Changeset View
Standalone View
Standalone View
src/widgetbasedpoller.h
1 | /* This file is part of the KDE libraries | 1 | /* This file is part of the KDE libraries | ||
---|---|---|---|---|---|
2 | * SPDX-FileCopyrightText: 2009 Dario Freddi <drf at kde.org> | 2 | * SPDX-FileCopyrightText: 2009 Dario Freddi <drf at kde.org> | ||
3 | * | 3 | * | ||
4 | * SPDX-License-Identifier: LGPL-2.0-only | 4 | * SPDX-License-Identifier: LGPL-2.0-only | ||
5 | */ | 5 | */ | ||
6 | 6 | | |||
7 | #ifndef WIDGETBASEDPOLLER_H | 7 | #ifndef WIDGETBASEDPOLLER_H | ||
8 | #define WIDGETBASEDPOLLER_H | 8 | #define WIDGETBASEDPOLLER_H | ||
9 | 9 | | |||
10 | #include <kidletime_export.h> | 10 | #include <kidletime_export.h> | ||
11 | 11 | | |||
12 | #include "abstractsystempoller.h" | 12 | #include "abstractsystempoller.h" | ||
13 | 13 | | |||
14 | class QTimer; | 14 | class QTimer; | ||
15 | class QEvent; | 15 | class QEvent; | ||
16 | class QWindow; | ||||
16 | 17 | | |||
18 | // TODO KF6 rename WindowBasedPoller | ||||
davidedmundson: it's not an installed header, no need to wait
| |||||
Ok, I'll remove this comment. Let's do the rename in a separate patch when this goes in. broulik: Ok, I'll remove this comment. Let's do the rename in a separate patch when this goes in. | |||||
17 | class KIDLETIME_EXPORT WidgetBasedPoller : public AbstractSystemPoller | 19 | class KIDLETIME_EXPORT WidgetBasedPoller : public AbstractSystemPoller | ||
18 | { | 20 | { | ||
19 | Q_OBJECT | 21 | Q_OBJECT | ||
20 | 22 | | |||
21 | public: | 23 | public: | ||
22 | explicit WidgetBasedPoller(QObject *parent = nullptr); | 24 | explicit WidgetBasedPoller(QObject *parent = nullptr); | ||
23 | ~WidgetBasedPoller() override; | 25 | ~WidgetBasedPoller() override; | ||
24 | 26 | | |||
Show All 19 Lines | 42 | private Q_SLOTS: | |||
44 | void waitForActivity(); | 46 | void waitForActivity(); | ||
45 | void releaseInputLock(); | 47 | void releaseInputLock(); | ||
46 | 48 | | |||
47 | private: | 49 | private: | ||
48 | virtual bool additionalSetUp() = 0; | 50 | virtual bool additionalSetUp() = 0; | ||
49 | 51 | | |||
50 | private: | 52 | private: | ||
51 | QTimer *m_pollTimer; | 53 | QTimer *m_pollTimer; | ||
52 | QWidget *m_grabber; | 54 | QWindow *m_grabber; | ||
53 | QList<int> m_timeouts; | 55 | QList<int> m_timeouts; | ||
54 | }; | 56 | }; | ||
55 | 57 | | |||
56 | #endif /* WIDGETBASEDPOLLER_H */ | 58 | #endif /* WIDGETBASEDPOLLER_H */ |
it's not an installed header, no need to wait