summaryrefslogtreecommitdiffstats
path: root/src/input/frontend/qmousedevice.cpp
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@theqtcompany.com>2016-05-25 07:00:50 +0300
committerSean Harmer <sean.harmer@kdab.com>2016-05-25 19:52:23 +0000
commite7171fea8981c695274746449d98f1243e1f6a0b (patch)
treea4ffb6997aafef10e3665570f91a18241221d5fa /src/input/frontend/qmousedevice.cpp
parent78ce47be07d077f26a1542c8cd84b8f788834e1a (diff)
Add doc skeleton for Qt3DInput
Conflicts: src/input/frontend/qanalogaxisinput.cpp src/input/frontend/qaxis.cpp src/input/frontend/qaxissetting.cpp src/input/frontend/qbuttonaxisinput.cpp src/input/frontend/qinputsettings.cpp src/input/frontend/qmousedevice.cpp Change-Id: Ic3e06179f745520d9c49af8d8242af360cbd20d8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/input/frontend/qmousedevice.cpp')
-rw-r--r--src/input/frontend/qmousedevice.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/input/frontend/qmousedevice.cpp b/src/input/frontend/qmousedevice.cpp
index ec0a24f46..c7be4d5e9 100644
--- a/src/input/frontend/qmousedevice.cpp
+++ b/src/input/frontend/qmousedevice.cpp
@@ -71,6 +71,25 @@ QMouseDevicePrivate::QMouseDevicePrivate()
* \since 5.5
* \sa QMouseHandler
*/
+
+/*!
+ \qmlproperty real MouseDevice::sensitivity
+ */
+
+/*!
+ \enum QMouseDevice::Axis
+
+ The mouse axis.
+
+ \value X
+ \value Y
+
+ \sa Qt3DInput::QAnalogAxisInput::setAxis
+ */
+
+/*!
+ Constructs a new QMouseDevice instance with parent \a parent.
+ */
QMouseDevice::QMouseDevice(QNode *parent)
: QAbstractPhysicalDevice(*new QMouseDevicePrivate, parent)
{
@@ -81,17 +100,32 @@ QMouseDevice::~QMouseDevice()
{
}
+/*!
+ \return the axis count.
+
+ \note Currently always returns 2.
+ */
int QMouseDevice::axisCount() const
{
// TO DO: we could have mouse wheel later on
return 2;
}
+/*!
+ \return the button count.
+
+ \note Currently always returns 3.
+ */
int QMouseDevice::buttonCount() const
{
return 3;
}
+/*!
+ \return the names of the axis.
+
+ \note Currently always returns StringList["X", "Y"]
+ */
QStringList QMouseDevice::axisNames() const
{
return QStringList()
@@ -99,6 +133,11 @@ QStringList QMouseDevice::axisNames() const
<< QStringLiteral("Y");
}
+/*!
+ \return the names of the buttons.
+
+ \note Currently always returns StringList["Left", "Right", "Center"]
+ */
QStringList QMouseDevice::buttonNames() const
{
return QStringList()
@@ -107,6 +146,9 @@ QStringList QMouseDevice::buttonNames() const
<< QStringLiteral("Center");
}
+/*!
+ Convert axis \a name to axis identifier.
+ */
int QMouseDevice::axisIdentifier(const QString &name) const
{
if (name == QLatin1String("X"))
@@ -116,6 +158,11 @@ int QMouseDevice::axisIdentifier(const QString &name) const
return -1;
}
+/*!
+ \property Qt3DInput::QMouseDevice::sensitivity
+
+ The sensitivity of the device.
+ */
float QMouseDevice::sensitivity() const
{
Q_D(const QMouseDevice);