Open-Typer
Open source typewriting tutor program
Loading...
Searching...
No Matches
QmlKeyboardHandler.h
1
/*
2
* QmlKeyboardHandler.h
3
* This file is part of Open-Typer
4
*
5
* Copyright (C) 2022 - adazem009
6
*
7
* Open-Typer is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
11
*
12
* Open-Typer is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with Open-Typer. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef QMLKEYBOARDHANDLER_H
22
#define QMLKEYBOARDHANDLER_H
23
24
#include <QQuickItem>
25
#include "KeyboardUtils.h"
26
#include "KeyEvent.h"
27
29
class
Q_DECL_EXPORT
QmlKeyboardHandler
:
public
QQuickItem
30
{
31
Q_OBJECT
32
public
:
33
explicit
QmlKeyboardHandler
(QQuickItem *parent =
nullptr
);
34
35
protected
:
36
void
inputMethodEvent(QInputMethodEvent *event)
override
;
37
void
keyPressEvent(QKeyEvent *event)
override
;
38
void
keyReleaseEvent(QKeyEvent *event)
override
;
39
40
signals:
41
void
keyPressed(
KeyEvent
event);
42
void
keyReleased(
KeyEvent
event);
43
};
44
45
#endif
// QMLKEYBOARDHANDLER_H
KeyEvent
Definition
KeyEvent.h:29
QmlKeyboardHandler
The QmlKeyboardHandler class can be used to receive any key presses (including dead keys).
Definition
QmlKeyboardHandler.h:30
src
framework
keyboard
internal
QmlKeyboardHandler.h
Generated by
1.9.8