diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-05-24 12:09:44 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-05-24 12:10:02 +0100 |
commit | 77d294db076dac19e8b549b445ffede9f7260c84 (patch) | |
tree | 828ee7a6862ec5c0bd24f97cb540625a2c647376 /src/input/frontend/qmouseevent.h | |
parent | 59f8fec8a41606b3185fe3a4e276978e3e1ed5ef (diff) | |
parent | 939b9b4b7591e8a421cf048a0a84ed3e75d81d21 (diff) |
Merge branch 'dev' into wip/animationwip/animation
Change-Id: I6e770609c90a7745d08fa4e2f424e865678c5d6f
Diffstat (limited to 'src/input/frontend/qmouseevent.h')
-rw-r--r-- | src/input/frontend/qmouseevent.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/input/frontend/qmouseevent.h b/src/input/frontend/qmouseevent.h index c1051dc1f..63786ac28 100644 --- a/src/input/frontend/qmouseevent.h +++ b/src/input/frontend/qmouseevent.h @@ -41,9 +41,9 @@ #define QT3DINPUT_QMOUSEEVENT_H #include <Qt3DInput/qt3dinput_global.h> -#include <QObject> +#include <QtCore/QtGlobal> +#include <QtCore/QObject> #include <QtGui/QMouseEvent> -#include <QtGlobal> QT_BEGIN_NAMESPACE @@ -85,7 +85,13 @@ public: inline int x() const { return m_event.x(); } inline int y() const { return m_event.y(); } - inline bool wasHeld() const { return static_cast<Qt::GestureType>(m_event.type()) == Qt::TapAndHoldGesture; } + inline bool wasHeld() const { +#if QT_CONFIG(gestures) + return static_cast<Qt::GestureType>(m_event.type()) == Qt::TapAndHoldGesture; +#else + return false; +#endif + } Buttons button() const; int buttons() const; Modifiers modifiers() const; @@ -100,6 +106,7 @@ private: typedef QSharedPointer<QMouseEvent> QMouseEventPtr; +#if QT_CONFIG(wheelevent) class QT3DINPUTSHARED_EXPORT QWheelEvent : public QObject { Q_OBJECT @@ -148,12 +155,16 @@ private: }; typedef QSharedPointer<QWheelEvent> QWheelEventPtr; +#endif } // namespace Qt3DInput QT_END_NAMESPACE Q_DECLARE_METATYPE(Qt3DInput::QMouseEvent*) // LCOV_EXCL_LINE + +#if QT_CONFIG(wheelevent) Q_DECLARE_METATYPE(Qt3DInput::QWheelEvent*) // LCOV_EXCL_LINE +#endif #endif // QT3DINPUT_QMOUSEEVENT_H |