KTextEditor

keyevent.cpp
1/*
2 SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#include "keyevent.h"
7
8using namespace KateVi;
9
10QEvent::Type KeyEvent::type() const
11{
12 return m_type;
13}
14
15Qt::KeyboardModifiers KeyEvent::modifiers() const
16{
17 return m_modifiers;
18}
19
20int KeyEvent::key() const
21{
22 return m_key;
23}
24
25QString KeyEvent::text() const
26{
27 return m_text;
28}
29
30KeyEvent KeyEvent::fromQKeyEvent(const QKeyEvent &e)
31{
33 keyEvent.m_type = e.type();
34 keyEvent.m_modifiers = e.modifiers();
35 keyEvent.m_key = e.key();
36 keyEvent.m_text = e.text();
37 return keyEvent;
38}
QEvent wrapper for copying/storing key events.
Definition keyevent.h:19
QEvent::Type type() const const
int key() const const
Qt::KeyboardModifiers modifiers() const const
QString text() const const
typedef KeyboardModifiers
void keyEvent(QTest::KeyAction action, QWindow *window, char ascii, Qt::KeyboardModifiers modifier, int delay)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Feb 24 2024 20:00:58 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.