diff options
Diffstat (limited to 'src/input/frontend/qmousedevice.cpp')
-rw-r--r-- | src/input/frontend/qmousedevice.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/input/frontend/qmousedevice.cpp b/src/input/frontend/qmousedevice.cpp index bbf42b793..56d3731ce 100644 --- a/src/input/frontend/qmousedevice.cpp +++ b/src/input/frontend/qmousedevice.cpp @@ -91,6 +91,8 @@ QMouseDevicePrivate::QMouseDevicePrivate() \value X \value Y + \value WheelX + \value WheelY \sa Qt3DInput::QAnalogAxisInput::setAxis */ @@ -125,12 +127,11 @@ QMouseDevice::~QMouseDevice() /*! \return the axis count. - \note Currently always returns 2. + \note Currently always returns 4. */ int QMouseDevice::axisCount() const { - // TO DO: we could have mouse wheel later on - return 2; + return 4; } /*! @@ -152,7 +153,9 @@ QStringList QMouseDevice::axisNames() const { return QStringList() << QStringLiteral("X") - << QStringLiteral("Y"); + << QStringLiteral("Y") + << QStringLiteral("WheelX") + << QStringLiteral("WheelY"); } /*! @@ -177,6 +180,10 @@ int QMouseDevice::axisIdentifier(const QString &name) const return X; else if (name == QLatin1String("Y")) return Y; + else if (name == QLatin1String("WheelX")) + return WheelX; + else if (name == QLatin1String("WheelY")) + return WheelY; return -1; } |