File indexing completed on 2024-12-01 05:04:16
0001 /* 0002 SPDX-FileCopyrightText: 2019 Harald Sitter <sitter@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #pragma once 0008 0009 #include <QGuiApplication> 0010 0011 class QKeyEvent; 0012 0013 // Simple QGuiApp overlay to gobble up all key events for input-detection. 0014 class Application final : public QGuiApplication 0015 { 0016 Q_OBJECT 0017 public: 0018 using QGuiApplication::QGuiApplication; 0019 0020 bool notify(QObject *receiver, QEvent *event) override; 0021 0022 static Application *instance(); 0023 0024 Q_SIGNALS: 0025 void keyEvent(QKeyEvent *event); 0026 };