mirror of
https://github.com/Qortal/Brooklyn.git
synced 2025-02-23 23:55:54 +00:00
40 lines
712 B
C++
40 lines
712 B
C++
|
/*
|
||
|
SPDX-FileCopyrightText: 2014 Eike Hein <hein@kde.org>
|
||
|
|
||
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||
|
*/
|
||
|
|
||
|
#include "wheelinterceptor.h"
|
||
|
|
||
|
#include <QCoreApplication>
|
||
|
|
||
|
WheelInterceptor::WheelInterceptor(QQuickItem *parent)
|
||
|
: QQuickItem(parent)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
WheelInterceptor::~WheelInterceptor()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
QObject *WheelInterceptor::destination() const
|
||
|
{
|
||
|
return m_destination;
|
||
|
}
|
||
|
|
||
|
void WheelInterceptor::setDestination(QObject *destination)
|
||
|
{
|
||
|
if (m_destination != destination) {
|
||
|
m_destination = destination;
|
||
|
|
||
|
Q_EMIT destinationChanged();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void WheelInterceptor::wheelEvent(QWheelEvent *event)
|
||
|
{
|
||
|
if (m_destination) {
|
||
|
QCoreApplication::sendEvent(m_destination, event);
|
||
|
}
|
||
|
}
|