File indexing completed on 2024-04-28 05:32:02

0001 /*
0002  * SPDX-FileCopyrightText: 2017 Aetf <aetf@unlimitedcodeworks.xyz>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  *
0006  */
0007 
0008 #ifndef MOUSEHELPER_H
0009 #define MOUSEHELPER_H
0010 
0011 #include <QObject>
0012 #include <QPoint>
0013 #include <QVariantMap>
0014 
0015 class QMimeData;
0016 
0017 namespace Milou
0018 {
0019 class MouseHelper : public QObject
0020 {
0021     Q_OBJECT
0022 
0023 public:
0024     explicit MouseHelper(QObject *parent = nullptr);
0025     ~MouseHelper() override;
0026 
0027     Q_INVOKABLE QPointF globalMousePosition() const;
0028 
0029     /*
0030      * Converts QMimeData to QVariantMap
0031      * @internal will be removed after https://codereview.qt-project.org/c/qt/qtdeclarative/+/491548
0032      */
0033     Q_INVOKABLE QVariantMap generateMimeDataMap(QMimeData *data) const;
0034 };
0035 
0036 }
0037 #endif // MOUSEHELPER_H