| | |
| | | // version without notice, or may even be removed. |
| | | // |
| | | |
| | | #include <QtCore/QObject> |
| | | #include <QtCore/QLoggingCategory> |
| | | #include <QtGui/QMouseEvent> |
| | | |
| | |
| | | |
| | | namespace QWK { |
| | | |
| | | namespace Private { |
| | | |
| | | class ObjectHelper : public QObject { |
| | | public: |
| | | static inline bool sendEvent(QObject *obj, QEvent *event) { |
| | | return static_cast<ObjectHelper *>(obj)->event(event); |
| | | } |
| | | }; |
| | | |
| | | } |
| | | |
| | | inline QPoint getMouseEventScenePos(const QMouseEvent *event) { |
| | | #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) |
| | | return event->scenePosition().toPoint(); |
| | |
| | | return event->screenPos().toPoint(); |
| | | #endif |
| | | } |
| | | |
| | | } |
| | | |
| | | #endif // QWKGLOBAL_P_H |