KTextEditor

keyevent.h
1/*
2 SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef KATEVI_KEYEVENT_H
7#define KATEVI_KEYEVENT_H
8
9#include <QKeyEvent>
10
11namespace KateVi
12{
13
14/** QEvent wrapper for copying/storing key events.
15 * With Qt6 QEvent itself is no longer copyable/movable and therefore
16 * cannot be held inside containers.
17 */
19{
20public:
21 QEvent::Type type() const;
22 Qt::KeyboardModifiers modifiers() const;
23 int key() const;
24 QString text() const;
25
26 static KeyEvent fromQKeyEvent(const QKeyEvent &e);
27
28private:
31 int m_key = 0;
32 QString m_text;
33};
34
35}
36
37#endif // KATEVI_KEYEVENT_H
QEvent wrapper for copying/storing key events.
Definition keyevent.h:19
typedef KeyboardModifiers
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:59:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.