feather/src/utils/EventFilter.cpp

19 lines
455 B
C++
Raw Normal View History

2022-03-04 16:20:17 +00:00
// SPDX-License-Identifier: BSD-3-Clause
2023-01-02 19:30:11 +00:00
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
2022-03-04 16:20:17 +00:00
#include "EventFilter.h"
#include <QKeyEvent>
#include <QDebug>
EventFilter::EventFilter(QObject *parent)
: QObject(parent)
{}
bool EventFilter::eventFilter(QObject *obj, QEvent *ev) {
if (ev->type() == QEvent::KeyPress || ev->type() == QEvent::MouseButtonRelease) {
emit userActivity();
}
return QObject::eventFilter(obj, ev);
}