KWin
Loading...
Searching...
No Matches
src
idledetector.h
Go to the documentation of this file.
1
/*
2
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4
SPDX-License-Identifier: GPL-2.0-or-later
5
*/
6
7
#pragma once
8
9
#include <kwin_export.h>
10
11
#include <QTimer>
12
13
namespace
KWin
14
{
15
16
class
KWIN_EXPORT
IdleDetector
:
public
QObject
17
{
18
Q_OBJECT
19
20
public
:
21
explicit
IdleDetector
(std::chrono::milliseconds timeout, QObject *parent =
nullptr
);
22
~IdleDetector
()
override
;
23
24
void
activity();
25
26
bool
isInhibited()
const
;
27
void
setInhibited(
bool
inhibited);
28
29
Q_SIGNALS:
30
void
idle
();
31
void
resumed
();
32
33
private
:
34
void
markAsIdle();
35
void
markAsResumed();
36
37
QTimer *m_timer;
38
bool
m_isIdle =
false
;
39
bool
m_isInhibited =
false
;
40
};
41
42
}
// namespace KWin
KWin::IdleDetector
Definition
idledetector.h:17
KWin::IdleDetector::idle
void idle()
KWin::IdleDetector::resumed
void resumed()
KWin
Definition
activation_test.cpp:20
Generated on Sat Feb 17 2024 01:42:09 for KWin by
1.10.0