DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dkeyboardmonitor.h
1
// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd.
2
//
3
// SPDX-License-Identifier: LGPL-3.0-or-later
4
5
#ifndef KEYBOARDMONITOR_H
6
#define KEYBOARDMONITOR_H
7
8
#include <QThread>
9
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
10
#include <QX11Info>
11
#else
12
#include <QtGui/private/qtx11extras_p.h>
13
#endif
14
#include <dtkwidget_global.h>
15
16
DWIDGET_BEGIN_NAMESPACE
17
18
class
DKeyboardMonitor
:
public
QThread
19
{
20
Q_OBJECT
21
22
public
:
23
static
DKeyboardMonitor
*instance();
24
25
bool
isCapslockOn();
26
bool
isNumlockOn();
27
bool
setNumlockStatus(
const
bool
&on);
28
29
Q_SIGNALS:
30
void
capslockStatusChanged(
bool
on);
31
void
numlockStatusChanged(
bool
on);
32
33
protected
:
34
void
run() Q_DECL_OVERRIDE;
35
36
private
:
37
DKeyboardMonitor
();
38
39
int
listen(Display *display);
40
};
41
42
DWIDGET_END_NAMESPACE
43
44
#endif
// KEYBOARDMONITOR_H
Dtk::Widget::DKeyboardMonitor
Definition
dkeyboardmonitor.h:19
src
widgets
private
keyboardmonitor
dkeyboardmonitor.h
文档生成时间:2024-11-15-05:51 +00
Doxygen Version
1.9.8
制作者:deepin doc doc go SIG
文档使用CC-BY-4.0共享