File indexing completed on 2024-05-12 05:37:08

0001 /*
0002     SPDX-FileCopyrightText: 2023 Fushan Wen <qydwhotmail@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include <QObject>
0008 #include <QPointer>
0009 
0010 class QQuickItem;
0011 
0012 class WheelForwarder : public QObject
0013 {
0014     Q_OBJECT
0015 
0016     Q_PROPERTY(QQuickItem *toItem MEMBER m_toItem)
0017 
0018 public:
0019     using QObject::QObject;
0020     Q_DISABLE_COPY_MOVE(WheelForwarder)
0021 
0022     Q_INVOKABLE void interceptWheelEvent(QQuickItem *from);
0023 
0024 private:
0025     bool eventFilter(QObject *watched, QEvent *event) override;
0026 
0027     QQuickItem *m_toItem = nullptr;
0028 };