summaryrefslogtreecommitdiffstats
path: root/src/input
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
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')
-rw-r--r--src/input/frontend/qabstractactioninput.cpp2
-rw-r--r--src/input/frontend/qabstractaxisinput.cpp23
-rw-r--r--src/input/frontend/qabstractphysicaldevice.cpp20
-rw-r--r--src/input/frontend/qaction.cpp31
-rw-r--r--src/input/frontend/qactioninput.cpp69
-rw-r--r--src/input/frontend/qanalogaxisinput.cpp20
-rw-r--r--src/input/frontend/qaxis.cpp41
-rw-r--r--src/input/frontend/qaxissetting.cpp26
-rw-r--r--src/input/frontend/qbuttonaxisinput.cpp20
-rw-r--r--src/input/frontend/qinputaspect.cpp24
-rw-r--r--src/input/frontend/qinputchord.cpp34
-rw-r--r--src/input/frontend/qinputsequence.cpp31
-rw-r--r--src/input/frontend/qinputsettings.cpp31
-rw-r--r--src/input/frontend/qkeyboarddevice.cpp33
-rw-r--r--src/input/frontend/qkeyboardhandler.cpp12
-rw-r--r--src/input/frontend/qkeyevent.cpp2
-rw-r--r--src/input/frontend/qlogicaldevice.cpp17
-rw-r--r--src/input/frontend/qmousedevice.cpp47
-rw-r--r--src/input/frontend/qmouseevent.cpp106
-rw-r--r--src/input/frontend/qmousehandler.cpp53
20 files changed, 509 insertions, 133 deletions
diff --git a/src/input/frontend/qabstractactioninput.cpp b/src/input/frontend/qabstractactioninput.cpp
index 5d8f76fab..f5e9ff33e 100644
--- a/src/input/frontend/qabstractactioninput.cpp
+++ b/src/input/frontend/qabstractactioninput.cpp
@@ -53,7 +53,7 @@ namespace Qt3DInput {
*/
/*!
- \qmltype QAbstractActionInput
+ \qmltype AbstractActionInput
\inqmlmodule Qt3D.Input
\instantiates Qt3DInput::QAbstractActionInput
\brief QML frontend for the abstract Qt3DInput::QAbstractActionInput C++ class.
diff --git a/src/input/frontend/qabstractaxisinput.cpp b/src/input/frontend/qabstractaxisinput.cpp
index ff7c69c12..9c47ca478 100644
--- a/src/input/frontend/qabstractaxisinput.cpp
+++ b/src/input/frontend/qabstractaxisinput.cpp
@@ -47,27 +47,41 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
/*!
- * \qmltype AxisInput
- * \instantiates Qt3DInput::QAxisInput
+ * \qmltype AbstractAxisInput
* \inqmlmodule Qt3D.Input
+ * \brief QML frontend for abstract QAbstractAxisInput C++ class.
* \since 5.5
* \TODO
*
*/
/*!
- * \class Qt3DInput::QAxisInput
+ * \class Qt3DInput::QAbstractAxisInput
* \inmodule Qt3DInput
+ * \brief A QAbstractAxisInput class.
* \since 5.5
* \TODO
*
*/
+/*!
+ \qmlproperty AbstractPhysicalDevice Qt3D.Input::AbstractAxisInput::sourceDevice
+*/
+
+/*!
+ \internal
+ */
QAbstractAxisInput::QAbstractAxisInput(QAbstractAxisInputPrivate &dd, Qt3DCore::QNode *parent)
: QNode(dd, parent)
{
}
+/*!
+ \property Qt3DInput::QAbstractAxisInput::sourceDevice
+
+ The source device for the QAbstractAxisInput.
+*/
+
void QAbstractAxisInput::setSourceDevice(QAbstractPhysicalDevice *sourceDevice)
{
Q_D(QAbstractAxisInput);
@@ -92,6 +106,9 @@ void QAbstractAxisInput::setSourceDevice(QAbstractPhysicalDevice *sourceDevice)
}
}
+/*!
+ \internal
+ */
QAbstractAxisInput::~QAbstractAxisInput()
{
}
diff --git a/src/input/frontend/qabstractphysicaldevice.cpp b/src/input/frontend/qabstractphysicaldevice.cpp
index 98313773e..4984b4300 100644
--- a/src/input/frontend/qabstractphysicaldevice.cpp
+++ b/src/input/frontend/qabstractphysicaldevice.cpp
@@ -82,7 +82,7 @@ QAbstractPhysicalDevicePrivate::~QAbstractPhysicalDevicePrivate()
*/
/*!
- Constructs a new QAbstractPhysicalDevice instance with parent \a parent.
+ Constructs a new QAbstractPhysicalDevice instance with \a parent.
*/
QAbstractPhysicalDevice::QAbstractPhysicalDevice(Qt3DCore::QNode *parent)
: Qt3DCore::QNode(*new QAbstractPhysicalDevicePrivate, parent)
@@ -100,7 +100,7 @@ QAbstractPhysicalDevice::QAbstractPhysicalDevice(QAbstractPhysicalDevicePrivate
}
/*!
- Return the number of axis this device has.
+ \return the number of axis this device has.
*/
int QAbstractPhysicalDevice::axisCount() const
{
@@ -109,7 +109,7 @@ int QAbstractPhysicalDevice::axisCount() const
}
/*!
- Return the number of buttons this device has.
+ \return the number of buttons this device has.
*/
int QAbstractPhysicalDevice::buttonCount() const
{
@@ -118,7 +118,7 @@ int QAbstractPhysicalDevice::buttonCount() const
}
/*!
- Return a list of the names of device's axis.
+ \return a list of the names of device's axis.
*/
QStringList QAbstractPhysicalDevice::axisNames() const
{
@@ -127,7 +127,7 @@ QStringList QAbstractPhysicalDevice::axisNames() const
}
/*!
- Return a list of the names of device's buttons.
+ \return a list of the names of device's buttons.
*/
QStringList QAbstractPhysicalDevice::buttonNames() const
{
@@ -136,7 +136,7 @@ QStringList QAbstractPhysicalDevice::buttonNames() const
}
/*!
- Return the integer identifer of the axis /a name or -1 if it does not exist on this device.
+ \return the integer identifer of the axis \a name or -1 if it does not exist on this device.
*/
int QAbstractPhysicalDevice::axisIdentifier(const QString &name) const
{
@@ -148,7 +148,7 @@ int QAbstractPhysicalDevice::axisIdentifier(const QString &name) const
}
/*!
- Return the integer identifer of the button /a name or -1 if it does not exist on this device.
+ \return the integer identifer of the button \a name or -1 if it does not exist on this device.
*/
int QAbstractPhysicalDevice::buttonIdentifier(const QString &name) const
{
@@ -160,7 +160,7 @@ int QAbstractPhysicalDevice::buttonIdentifier(const QString &name) const
}
/*!
- Add the axisSetting /a axisSetting to this device.
+ Add the axisSetting \a axisSetting to this device.
*/
void QAbstractPhysicalDevice::addAxisSetting(QAxisSetting *axisSetting)
{
@@ -177,7 +177,7 @@ void QAbstractPhysicalDevice::addAxisSetting(QAxisSetting *axisSetting)
}
/*!
- Remove the axisSetting /a axisSetting to this device.
+ Remove the axisSetting \a axisSetting to this device.
*/
void QAbstractPhysicalDevice::removeAxisSetting(QAxisSetting *axisSetting)
{
@@ -194,7 +194,7 @@ void QAbstractPhysicalDevice::removeAxisSetting(QAxisSetting *axisSetting)
}
/*!
- Return the axisSettings /ascociated with this device.
+ \return the axisSettings associated with this device.
*/
QVector<QAxisSetting *> QAbstractPhysicalDevice::axisSettings() const
{
diff --git a/src/input/frontend/qaction.cpp b/src/input/frontend/qaction.cpp
index 2d98cc9e8..e22469619 100644
--- a/src/input/frontend/qaction.cpp
+++ b/src/input/frontend/qaction.cpp
@@ -51,10 +51,10 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
/*!
- \class Qt3DInput::QActionInput
+ \class Qt3DInput::QAction
\inmodule Qt3DInput
- \inherits QAbstractActionInput
- \brief QActionInput stores Device and Keys used to trigger an input event.
+ \inherits Qt3DCore::QNode
+ \brief Links a set of QAbstractActionInput that trigger the same event.
\since 5.7
*/
@@ -64,7 +64,7 @@ namespace Qt3DInput {
\instantiates Qt3DInput::QAction
\brief QML frontend for the Qt3DInput::QAction C++ class.
- Links a set of QAbstractActionInputs that trigger the same event.
+ Links a set of AbstractActionInput that trigger the same event.
\since 5.7
*/
@@ -82,25 +82,14 @@ QAction::~QAction()
}
/*!
- \fn QAction::nameChanged()
-
- This signal is emitted when the name of the Action is changed.
-*/
-
-/*!
- \qmlproperty QString Qt3D.Input::Action::name
-
- the name used to identify this action
+ \qmlproperty bool Qt3D.Input::Action::action
*/
/*!
- \qmlsignal Qt3D.Input::Action::nameChanged()
-
- This signal is emitted when the name of the Action is changed.
-
- The corresponding handeler is \c onNameChanged
-*/
+ \property QAction::active
+ Holds \c true if the action is active.
+ */
bool QAction::isActive() const
{
Q_D(const QAction);
@@ -108,9 +97,9 @@ bool QAction::isActive() const
}
/*!
- \qmlproperty QQmlListProperty<Qt3DInput::QAbstractActionInput> Qt3D.Input::Action::inputs
+ \qmlproperty list<AbstractActionInput> Qt3D.Input::Action::inputs
- the list of QAbstractActionInput that must be triggered to trigger this Action.
+ The list of AbstractActionInput that must be triggered to trigger this Action.
*/
/*!
diff --git a/src/input/frontend/qactioninput.cpp b/src/input/frontend/qactioninput.cpp
index 0be75ec07..e15f7517b 100644
--- a/src/input/frontend/qactioninput.cpp
+++ b/src/input/frontend/qactioninput.cpp
@@ -55,7 +55,7 @@ QActionInputPrivate::QActionInputPrivate()
/*!
\class Qt3DInput::QActionInput
\inmodule Qt3DInput
- \inherits QAbstractActionInput
+ \inherits Qt3DInput::QAbstractActionInput
\brief QActionInput stores Device and Buttons used to trigger an input event.
\since 5.7
@@ -86,8 +86,21 @@ QActionInputPrivate::QActionInputPrivate()
\since 5.7
*/
+
+/*!
+ \qmlproperty AbstractPhysicalDevice ActionInput::sourceDevice
+
+ The current source device of the ActionInput.
+*/
+
+/*!
+ \qmlproperty list<int> Qt3D.Input::ActionInput::buttons
+
+ The Buttons that can trigger this Action.
+*/
+
/*!
- Constructs a new QActionInput instance with parent \a parent.
+ Constructs a new QActionInput instance with \a parent.
*/
QActionInput::QActionInput(Qt3DCore::QNode *parent)
: Qt3DInput::QAbstractActionInput(*new QActionInputPrivate(), parent)
@@ -101,7 +114,9 @@ QActionInput::~QActionInput()
}
/*!
- Return the Buttons to trigger the QActionInput instance.
+ \property Qt3DInput::QActionInput::buttons
+
+ Holds the buttons that can trigger this Action.
*/
QVector<int> QActionInput::buttons() const
{
@@ -110,28 +125,10 @@ QVector<int> QActionInput::buttons() const
}
/*!
- \fn QAbstractPhysicalDevice::sourceDeviceChanged()
-
- This signal is emitted when the source device ascociated with the action input is changed.
-*/
-
-/*!
- \qmlproperty QAbstractPhysicalDevice Qt3D.Input::ActionInput::sourceDevice
-
- The current source device of the ActionInput
-*/
-
-/*!
- \qmlsignal Qt3D.Input::ActionInput::sourceDeviceChanged()
-
- This signal is emitted when the source device ascociated with the action input is changed.
+ \property Qt3DInput::QActionInput::sourceDevice
- The corresponding handeler is \c onSourceDeviceChanged
+ The current source device of the QActionInput.
*/
-
-/*!
- Set the current source device of the QActionInput instance.
- */
void QActionInput::setSourceDevice(QAbstractPhysicalDevice *sourceDevice)
{
Q_D(QActionInput);
@@ -155,38 +152,12 @@ void QActionInput::setSourceDevice(QAbstractPhysicalDevice *sourceDevice)
}
}
-/*!
- Returns the current source device of the QActionInput instance.
- */
QAbstractPhysicalDevice *QActionInput::sourceDevice() const
{
Q_D(const QActionInput);
return d->m_sourceDevice;
}
-/*!
- \fn QAbstractPhysicalDevice::buttonsChanged()
-
- This signal is emitted when the buttons ascociated with the action input is changed.
-*/
-
-/*!
- \qmlproperty QVariantList Qt3D.Input::ActionInput::buttons
-
- The Buttons that can trigger this Action
-*/
-
-/*!
- \qmlsignal Qt3D.Input::ActionInput::buttonsChanged()
-
- This signal is emitted when the buttons ascociated with the action input is changed.
-
- The corresponding handeler is \c onbuttonsChanged
-*/
-
-/*!
- Set the buttons to trigger the QActionInput instance.
- */
void QActionInput::setButtons(const QVector<int> &buttons)
{
Q_D(QActionInput);
diff --git a/src/input/frontend/qanalogaxisinput.cpp b/src/input/frontend/qanalogaxisinput.cpp
index 92f3f5beb..0e8189c55 100644
--- a/src/input/frontend/qanalogaxisinput.cpp
+++ b/src/input/frontend/qanalogaxisinput.cpp
@@ -49,6 +49,7 @@ namespace Qt3DInput {
* \qmltype AnalogAxisInput
* \instantiates Qt3DInput::QAnalogAxisInput
* \inqmlmodule Qt3D.Input
+ * \brief QML frontend for QAnalogAxisInput C++ class.
* \since 5.7
* \TODO
*
@@ -57,10 +58,22 @@ namespace Qt3DInput {
/*!
* \class Qt3DInput::QAnalogAxisInput
* \inmodule Qt3DInput
+ * \brief A QAnalogAxisInput class.
* \since 5.7
* \TODO
*
*/
+
+/*!
+ \qmlproperty int AnalogAxisInput::axis
+
+ Holds the axis for the AnalogAxisInput.
+*/
+
+
+/*!
+ Constructs a new QAnalogAxisInput instance with \a parent.
+ */
QAnalogAxisInput::QAnalogAxisInput(Qt3DCore::QNode *parent)
: QAbstractAxisInput(*new QAnalogAxisInputPrivate, parent)
{
@@ -71,6 +84,13 @@ QAnalogAxisInput::~QAnalogAxisInput()
{
}
+/*!
+ \property Qt3DInput::QAnalogAxisInput::axis
+
+ Axis for the analog input.
+
+ \sa Qt3DInput::QMouseDevice::Axis
+*/
void QAnalogAxisInput::setAxis(int axis)
{
Q_D(QAnalogAxisInput);
diff --git a/src/input/frontend/qaxis.cpp b/src/input/frontend/qaxis.cpp
index 3b84e0205..212405351 100644
--- a/src/input/frontend/qaxis.cpp
+++ b/src/input/frontend/qaxis.cpp
@@ -51,6 +51,7 @@ namespace Qt3DInput {
/*!
* \qmltype Axis
* \inqmlmodule Qt3D.Input
+ * \brief QML frontend for QAxis C++ class.
* \since 5.5
* \TODO
*
@@ -59,11 +60,28 @@ namespace Qt3DInput {
/*!
* \class Qt3DInput::QAxis
* \inmodule Qt3DInput
+ * \brief A QAxis class.
* \since 5.5
* \TODO
*
*/
+/*!
+ \qmlproperty int QAxis::value
+ \readonly
+
+ Holds the value of the axis.
+*/
+
+/*!
+ \qmlproperty list<AbstractAxisInput> Qt3D.Input::Axis::inputs
+
+ List of axis inputs.
+*/
+
+/*!
+ Constructs a new QAxis instance with \a parent.
+ */
QAxis::QAxis(Qt3DCore::QNode *parent)
: Qt3DCore::QNode(*new QAxisPrivate(), parent)
{
@@ -74,6 +92,12 @@ QAxis::~QAxis()
{
}
+/*!
+ QAxis::addInput
+ Adds an \a input for the axis.
+
+ \sa Qt3DInput::QAbstractAxisInput
+ */
void QAxis::addInput(QAbstractAxisInput *input)
{
Q_D(QAxis);
@@ -94,6 +118,13 @@ void QAxis::addInput(QAbstractAxisInput *input)
}
}
+/*!
+ QAxis::removeInput
+
+ Removes an \a input from the axis.
+
+ \sa Qt3DInput::QAbstractAxisInput
+ */
void QAxis::removeInput(QAbstractAxisInput *input)
{
Q_D(QAxis);
@@ -112,12 +143,22 @@ void QAxis::removeInput(QAbstractAxisInput *input)
}
}
+/*!
+ QAxis::inputs
+
+ \return vector of all inputs added to the axis.
+ */
QVector<QAbstractAxisInput *> QAxis::inputs() const
{
Q_D(const QAxis);
return d->m_inputs;
}
+/*!
+ \property QAxis::value
+
+ The value of the axis.
+ */
float QAxis::value() const
{
Q_D(const QAxis);
diff --git a/src/input/frontend/qaxissetting.cpp b/src/input/frontend/qaxissetting.cpp
index 083203d2a..37013f74c 100644
--- a/src/input/frontend/qaxissetting.cpp
+++ b/src/input/frontend/qaxissetting.cpp
@@ -49,6 +49,7 @@ namespace Qt3DInput {
* \qmltype AxisSetting
* \instantiates Qt3DInput::QAxisSetting
* \inqmlmodule Qt3D.Input
+ * \brief QML frontend for QAxisSetting C++ class.
* \since 5.5
* \TODO
*
@@ -57,11 +58,27 @@ namespace Qt3DInput {
/*!
* \class Qt3DInput::QAxisSetting
* \inmodule Qt3DInput
+ * \brief A QAxisSetting class.
* \since 5.5
* \TODO
*
*/
+/*!
+ \qmlproperty real AxisSetting::deadZoneRadius
+*/
+
+/*!
+ \qmlproperty list<int> AxisSetting::axes
+*/
+
+/*!
+ \qmlproperty bool AxisSetting::smooth
+*/
+
+/*!
+ Constructs a new QAxisSetting instance with \a parent.
+ */
QAxisSetting::QAxisSetting(Qt3DCore::QNode *parent)
: QNode(*new QAxisSettingPrivate(), parent)
{
@@ -72,18 +89,27 @@ QAxisSetting::~QAxisSetting()
{
}
+/*!
+ \property QAxisSetting::axes
+ */
QVector<int> QAxisSetting::axes() const
{
Q_D(const QAxisSetting);
return d->m_axes;
}
+/*!
+ \property QAxisSetting::deadZoneRadius
+ */
float QAxisSetting::deadZoneRadius() const
{
Q_D(const QAxisSetting);
return d->m_deadZoneRadius;
}
+/*!
+ \property QAxisSetting::smooth
+ */
bool QAxisSetting::isSmoothEnabled() const
{
Q_D(const QAxisSetting);
diff --git a/src/input/frontend/qbuttonaxisinput.cpp b/src/input/frontend/qbuttonaxisinput.cpp
index 1586cc0dc..9d0d3b049 100644
--- a/src/input/frontend/qbuttonaxisinput.cpp
+++ b/src/input/frontend/qbuttonaxisinput.cpp
@@ -49,6 +49,7 @@ namespace Qt3DInput {
* \qmltype ButtonAxisInput
* \instantiates Qt3DInput::QButtonAxisInput
* \inqmlmodule Qt3D.Input
+ * \brief QML frontend for QButtonAxisInput C++ class.
* \since 5.7
* \TODO
*
@@ -57,10 +58,23 @@ namespace Qt3DInput {
/*!
* \class Qt3DInput::QButtonAxisInput
* \inmodule Qt3DInput
+ * \brief A QButtonAxisInput class.
* \since 5.7
* \TODO
*
*/
+/*!
+ \qmlproperty real ButtonAxisInput::scale
+*/
+
+/*!
+ \qmlproperty list<var> ButtonAxisInput::buttons
+*/
+
+
+/*!
+ Constructs a new QButtonAxisInput instance with \a parent.
+ */
QButtonAxisInput::QButtonAxisInput(Qt3DCore::QNode *parent)
: QAbstractAxisInput(*new QButtonAxisInputPrivate, parent)
{
@@ -71,6 +85,9 @@ QButtonAxisInput::~QButtonAxisInput()
{
}
+/*!
+ \property QButtonAxisInput::scale
+ */
void QButtonAxisInput::setScale(float scale)
{
Q_D(QButtonAxisInput);
@@ -86,6 +103,9 @@ float QButtonAxisInput::scale() const
return d->m_scale;
}
+/*!
+ \property QButtonAxisInput::buttons
+ */
void QButtonAxisInput::setButtons(const QVector<int> &buttons)
{
Q_D(QButtonAxisInput);
diff --git a/src/input/frontend/qinputaspect.cpp b/src/input/frontend/qinputaspect.cpp
index 0a364e27b..fbd7674d8 100644
--- a/src/input/frontend/qinputaspect.cpp
+++ b/src/input/frontend/qinputaspect.cpp
@@ -104,10 +104,15 @@ QInputAspectPrivate::QInputAspectPrivate()
/*!
\class Qt3DInput::QInputAspect
+ \inherits Qt3DCore::QAbstractAspect
\inmodule Qt3DInput
+ \brief A QInputAspect class.
\since 5.5
*/
+/*!
+ * Constructs a new QInputAspect with \a parent.
+ */
QInputAspect::QInputAspect(QObject *parent)
: QInputAspect(*new QInputAspectPrivate, parent)
{
@@ -167,7 +172,12 @@ void QInputAspectPrivate::loadInputDevicePlugins()
}
}
-// Note: caller is responsible for ownership
+
+/*!
+ Creates a physical device with \a name.
+
+ \note The caller is responsible for ownership.
+ */
QAbstractPhysicalDevice *QInputAspect::createPhysicalDevice(const QString &name)
{
Q_D(QInputAspect);
@@ -179,6 +189,9 @@ QAbstractPhysicalDevice *QInputAspect::createPhysicalDevice(const QString &name)
return nullptr;
}
+/*!
+ \return a list of all available physical devices.
+ */
QStringList QInputAspect::availablePhysicalDevices() const
{
Q_D(const QInputAspect);
@@ -189,6 +202,9 @@ QStringList QInputAspect::availablePhysicalDevices() const
return deviceNamesList;
}
+/*!
+ \internal
+ */
QVector<QAspectJobPtr> QInputAspect::jobsToExecute(qint64 time)
{
Q_UNUSED(time);
@@ -220,6 +236,9 @@ QVector<QAspectJobPtr> QInputAspect::jobsToExecute(qint64 time)
return jobs;
}
+/*!
+ \internal
+ */
void QInputAspect::onRegistered()
{
Q_D(QInputAspect);
@@ -230,6 +249,9 @@ void QInputAspect::onRegistered()
d->m_inputHandler->eventSourceHelper()->setEventFilterService(eventService);
}
+/*!
+ \internal
+ */
void QInputAspect::onUnregistered()
{
Q_D(QInputAspect);
diff --git a/src/input/frontend/qinputchord.cpp b/src/input/frontend/qinputchord.cpp
index 8260e66da..2753b53f0 100644
--- a/src/input/frontend/qinputchord.cpp
+++ b/src/input/frontend/qinputchord.cpp
@@ -86,11 +86,21 @@ namespace Qt3DInput {
}
]
}
- \end
+ \endqml
\since 5.7
*/
/*!
+ \qmlproperty list<AbstractActionInput> Qt3D.Input::InputChord::chords
+
+ The list of AbstractActionInput that must be triggered to trigger this aggregate input.
+*/
+
+/*!
+ \qmlproperty int Qt3D.Input::InputChord::timeout
+*/
+
+/*!
Constructs a new QInputChord with parent \a parent.
*/
QInputChord::QInputChord(Qt3DCore::QNode *parent)
@@ -105,22 +115,10 @@ QInputChord::~QInputChord()
}
/*!
- \fn QInputChord::timeoutChanged()
-
- This signal is emitted when the timeout of the input chord is changed.
-*/
+ \property QInputChord::timeout
-
-
-/*!
- \qmlproperty QQmlListProperty<Qt3DInput::QAbstractActionInput> Qt3D.Input::QInputChord::chords
-
- The list of QAbstractActionInput that must be triggered to trigger this aggregate input.
-*/
-
-/*!
- Returns the time in which all QAbstractActionInput's in the input chord must triggered within.
- The time is in milliseconds
+ The time in which all QAbstractActionInput's in the input chord must triggered within.
+ The time is in milliseconds.
*/
int QInputChord::timeout() const
{
@@ -144,7 +142,7 @@ void QInputChord::setTimeout(int timeout)
/*!
Append the QAbstractActionInput \a input to the end of this QInputChord's chord vector.
- \sa removeInput
+ \sa removeChord
*/
void QInputChord::addChord(QAbstractActionInput *input)
{
@@ -169,7 +167,7 @@ void QInputChord::addChord(QAbstractActionInput *input)
/*!
Remove the QAbstractActionInput \a input from this QInputChord's chord vector.
- \sa addInput
+ \sa addChord
*/
void QInputChord::removeChord(QAbstractActionInput *input)
{
diff --git a/src/input/frontend/qinputsequence.cpp b/src/input/frontend/qinputsequence.cpp
index 27f440ec7..673b93a08 100644
--- a/src/input/frontend/qinputsequence.cpp
+++ b/src/input/frontend/qinputsequence.cpp
@@ -109,15 +109,14 @@ QInputSequence::~QInputSequence()
}
/*!
- \fn QInputSequence::timeoutChanged()
-
- This signal is emitted when the timeout of the input sequence is changed.
+ \qmlproperty list<AbstractActionInput> Qt3D.Input::InputSequence::sequences
*/
+
/*!
- \qmlproperty int Qt3D.Input::InputSequence::timeout
+ \qmlproperty int Qt3D.Input::InputSequence::timeout
- The time in milliseconds in which all QAbstractActionInput's in the input sequence must triggered within.
+ The time in milliseconds in which all QAbstractActionInput's in the input sequence must triggered within.
*/
/*!
@@ -139,12 +138,6 @@ int QInputSequence::timeout() const
}
/*!
- \fn QInputSequence::buttonIntervalChanged()
-
- This signal is emitted when the buttonInterval of the input sequence is changed.
-*/
-
-/*!
\qmlproperty int Qt3D.Input::InputSequence::buttonInterval
The maximum time in milliseconds in between consecutive QAbstractActionInput's in the input sequence.
@@ -169,8 +162,10 @@ int QInputSequence::buttonInterval() const
}
/*!
- Set the time in which all QAbstractActionInput's in the input sequence must triggered within.
- The time is in milliseconds
+ \property QInputSequence::timeout
+
+ The time in which all QAbstractActionInput's in the input sequence must triggered within.
+ The time is in milliseconds.
*/
void QInputSequence::setTimeout(int timeout)
{
@@ -182,8 +177,10 @@ void QInputSequence::setTimeout(int timeout)
}
/*!
- Set the maximum time in between consecutive QAbstractActionInput's in the input sequence.
- The time is in milliseconds
+ \property QInputSequence::buttonInterval
+
+ The maximum time in between consecutive QAbstractActionInput's in the input sequence.
+ The time is in milliseconds.
*/
void QInputSequence::setButtonInterval(int buttonInterval)
{
@@ -197,7 +194,7 @@ void QInputSequence::setButtonInterval(int buttonInterval)
/*!
Append the QAbstractActionInput \a input to the end of this QInputSequence's sequence vector.
- \sa removeInput
+ \sa removeSequence
*/
void QInputSequence::addSequence(QAbstractActionInput *input)
{
@@ -222,7 +219,7 @@ void QInputSequence::addSequence(QAbstractActionInput *input)
/*!
Remove the QAbstractActionInput \a input from this QInputSequence's sequence vector.
- \sa addInput
+ \sa addSequence
*/
void QInputSequence::removeSequence(QAbstractActionInput *input)
{
diff --git a/src/input/frontend/qinputsettings.cpp b/src/input/frontend/qinputsettings.cpp
index fde2feb55..fd2261e3d 100644
--- a/src/input/frontend/qinputsettings.cpp
+++ b/src/input/frontend/qinputsettings.cpp
@@ -45,12 +45,38 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
+/*!
+ \class Qt3DInput::QInputSettings
+ \inmodule Qt3DInput
+ \inherits Qt3DCore::QComponent
+ \brief A QInputSettings class.
+ \since 5.7
+ \TODO
+*/
+
+/*!
+ \qmltype InputSettings
+ \inqmlmodule Qt3D.Input
+ \inherits Component3D
+ \instantiates Qt3DInput::QInputSettings
+ \brief QML frontend for the Qt3DInput::QInputSettings C++ class.
+ \since 5.7
+ \TODO
+*/
+
+/*!
+ \qmlproperty Object Qt3D.Input::InputSettings::eventSource
+ */
+
QInputSettingsPrivate::QInputSettingsPrivate()
: Qt3DCore::QComponentPrivate()
, m_eventSource(nullptr)
{
}
+/*!
+ Constructs a new QInputSettings instance with \a parent.
+ */
QInputSettings::QInputSettings(Qt3DCore::QNode *parent)
: Qt3DCore::QComponent(*new QInputSettingsPrivate(), parent)
{
@@ -61,6 +87,11 @@ QInputSettings::~QInputSettings()
{
}
+/*!
+ \property QInputSettings::eventSource
+
+ Holds the source for the QInputSettings.
+ */
QObject *QInputSettings::eventSource() const
{
Q_D(const QInputSettings);
diff --git a/src/input/frontend/qkeyboarddevice.cpp b/src/input/frontend/qkeyboarddevice.cpp
index e2ade6efb..dd0a1df9a 100644
--- a/src/input/frontend/qkeyboarddevice.cpp
+++ b/src/input/frontend/qkeyboarddevice.cpp
@@ -203,17 +203,22 @@ QKeyboardDevicePrivate::QKeyboardDevicePrivate()
/*!
\class Qt3DInput::QKeyboardDevice
\inmodule Qt3DInput
+ \brief A QKeyboardDevice class.
\since 5.5
*/
/*!
\qmltype KeyboardDevice
\inqmlmodule Qt3D.Input
+ \brief QML frontend for QKeyboardDevice C++ class.
\since 5.5
\instantiates Qt3DInput::QKeyboardDevice
\inherits Node
*/
+/*!
+ Constructs a new QKeyboardDevice instance with \a parent.
+ */
QKeyboardDevice::QKeyboardDevice(QNode *parent)
: QAbstractPhysicalDevice(*new QKeyboardDevicePrivate, parent)
{
@@ -228,40 +233,68 @@ QKeyboardDevice::~QKeyboardDevice()
\qmlproperty KeyboardHandler Qt3D.Input::KeyboardDevice::activeInput
\readonly
*/
+
+/*!
+ \property QKeyboardDevice::activeInput
+
+ Holds the active QKeyboardHandler of the device.
+ */
QKeyboardHandler *QKeyboardDevice::activeInput() const
{
Q_D(const QKeyboardDevice);
return d->m_activeInput;
}
+/*!
+ \return the axis count.
+
+ \note Currently always returns zero.
+ */
int QKeyboardDevice::axisCount() const
{
return 0;
}
+/*!
+ \return the button count.
+ */
int QKeyboardDevice::buttonCount() const
{
Q_D(const QKeyboardDevice);
return d->m_keyNames.size();
}
+/*!
+ \return the axis names.
+
+ \note Currently always returns empty QStringList.
+ */
QStringList QKeyboardDevice::axisNames() const
{
return QStringList();
}
+/*!
+ \return the button names.
+ */
QStringList QKeyboardDevice::buttonNames() const
{
Q_D(const QKeyboardDevice);
return d->m_keyNames;
}
+/*!
+ \return the axisIdentifier matching the \a name.
+ */
int QKeyboardDevice::axisIdentifier(const QString &name) const
{
Q_UNUSED(name);
return 0;
}
+/*!
+ \return the buttonIdentifier matching the \a name.
+ */
int QKeyboardDevice::buttonIdentifier(const QString &name) const
{
Q_D(const QKeyboardDevice);
diff --git a/src/input/frontend/qkeyboardhandler.cpp b/src/input/frontend/qkeyboardhandler.cpp
index 59128ad4d..75bc7c52b 100644
--- a/src/input/frontend/qkeyboardhandler.cpp
+++ b/src/input/frontend/qkeyboardhandler.cpp
@@ -143,6 +143,7 @@ void QKeyboardHandlerPrivate::keyEvent(QKeyEvent *event)
/*!
\class Qt3DInput::QKeyboardHandler
\inmodule Qt3DInput
+ \brief A QKeyboardHandler class.
\since 5.5
*/
@@ -151,6 +152,7 @@ void QKeyboardHandlerPrivate::keyEvent(QKeyEvent *event)
\inqmlmodule Qt3D.Input
\instantiates Qt3DInput::QKeyboardHandler
\inherits Component3D
+ \brief QML frontend for QKeyboardHandler C++ class.
\since 5.5
*/
@@ -184,11 +186,13 @@ void QKeyboardHandler::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change)
}
/*!
- \qmlproperty KeyboardDevice Qt3D.Input::KeyboardHandler::device
+ \qmlproperty KeyboardDevice Qt3D.Input::KeyboardHandler::sourceDevice
*/
/*!
- Sets the keyboard device to \a keyboardDevice. Without a valid device,
+ \property QKeyboardHandler::sourceDevice
+
+ Holds the keyboard device of the QKeyboardHandler. Without a valid device,
the QKeyboardHandler won't receive any event.
*/
void QKeyboardHandler::setSourceDevice(QKeyboardDevice *keyboardDevice)
@@ -226,7 +230,9 @@ QKeyboardDevice *QKeyboardHandler::sourceDevice() const
*/
/*!
- Returns the current focus.
+ \property QKeyboardHandler::focus
+
+ Holds \c true if the QKeyboardHandlers has focus.
*/
bool QKeyboardHandler::focus() const
{
diff --git a/src/input/frontend/qkeyevent.cpp b/src/input/frontend/qkeyevent.cpp
index d3b346da0..ae022af93 100644
--- a/src/input/frontend/qkeyevent.cpp
+++ b/src/input/frontend/qkeyevent.cpp
@@ -48,6 +48,7 @@ namespace Qt3DInput {
/*!
\class Qt3DInput::QKeyEvent
\inmodule Qt3DInput
+ \brief QKeyEvent event type send by KeyBoardHandler.
\since 5.5
*/
@@ -55,6 +56,7 @@ namespace Qt3DInput {
\qmltype KeyEvent
\inqmlmodule Qt3D.Input
\instantiates Qt3DInput::QKeyEvent
+ \brief QML frontend for QKeyEvent C++ class.
\since 5.5
The KeyEvent QML type cannot be directly created. Objects of this type
diff --git a/src/input/frontend/qlogicaldevice.cpp b/src/input/frontend/qlogicaldevice.cpp
index 90c2e4b05..4794431b8 100644
--- a/src/input/frontend/qlogicaldevice.cpp
+++ b/src/input/frontend/qlogicaldevice.cpp
@@ -100,7 +100,7 @@ QLogicalDevicePrivate::~QLogicalDevicePrivate()
keys: [Qt.Key_S]
}
]
- },
+ }
]
},
Action {
@@ -111,7 +111,7 @@ QLogicalDevicePrivate::~QLogicalDevicePrivate()
keys: [Qt.Key_Alt]
}
]
- }
+ },
Action {
name: "combo"
inputs: [
@@ -136,6 +136,7 @@ QLogicalDevicePrivate::~QLogicalDevicePrivate()
]
}
]
+ }
\endqml
\since 5.6
@@ -154,13 +155,13 @@ QLogicalDevice::~QLogicalDevice()
}
/*!
- \qmlproperty QQmlListProperty<Action> Qt3D.Input::LogicalDevice::actions
+ \qmlproperty list<Action> Qt3D.Input::LogicalDevice::actions
The actions used by this Logical Device
*/
/*!
- Add an action to the list of actions.
+ Add an \a action to the list of actions.
*/
void QLogicalDevice::addAction(QAction *action)
{
@@ -183,7 +184,7 @@ void QLogicalDevice::addAction(QAction *action)
}
/*!
- Remove an action from the list of actions.
+ Remove an \a action from the list of actions.
*/
void QLogicalDevice::removeAction(QAction *action)
{
@@ -213,13 +214,13 @@ QVector<QAction *> QLogicalDevice::actions() const
}
/*!
- \qmlproperty QQmlListProperty<Axis> Qt3D.Input::LogicalDevice::axis
+ \qmlproperty list<Axis> Qt3D.Input::LogicalDevice::axis
The axis used by this Logical Device
*/
/*!
- Add an axis to the list of axis.
+ Add an \a axis to the list of axis.
*/
void QLogicalDevice::addAxis(QAxis *axis)
{
@@ -243,7 +244,7 @@ void QLogicalDevice::addAxis(QAxis *axis)
}
/*!
- Remove an axis drom the list of axis.
+ Remove an \a axis drom the list of axis.
*/
void QLogicalDevice::removeAxis(QAxis *axis)
{
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);
diff --git a/src/input/frontend/qmouseevent.cpp b/src/input/frontend/qmouseevent.cpp
index b14e2bb34..4fe8277ef 100644
--- a/src/input/frontend/qmouseevent.cpp
+++ b/src/input/frontend/qmouseevent.cpp
@@ -65,6 +65,40 @@ namespace Qt3DInput {
*/
/*!
+ * \qmlproperty int Qt3D.Input::MouseEvent::x
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty int Qt3D.Input::MouseEvent::y
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty bool Qt3D.Input::MouseEvent::wasHeld
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty Buttons Qt3D.Input::MouseEvent::button
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty int Qt3D.Input::MouseEvent::buttons
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty Modifiers Qt3D.Input::MouseEvent::modifiers
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty bool Qt3D.Input::MouseEvent::accepted
+ */
+
+/*!
* \class Qt3DInput::QMouseEvent
* \inmodule Qt3DInput
*
@@ -80,6 +114,28 @@ namespace Qt3DInput {
*
*/
+
+/*!
+ * \enum Qt3DInput::QMouseEvent::Buttons
+ *
+ * \value LeftButton
+ * \value RightButton
+ * \value MiddleButton
+ * \value BackButton
+ * \value NoButton
+ */
+
+/*!
+ * \enum Qt3DInput::QMouseEvent::Modifiers
+ *
+ * \value NoModifier
+ * \value ShiftModifier
+ * \value ControlModifier
+ * \value AltModifier
+ * \value MetaModifier
+ * \value KeypadModifier
+ */
+
/*!
* \fn int Qt3DInput::QMouseEvent::x() const
*
@@ -189,6 +245,35 @@ QMouseEvent::Modifiers QMouseEvent::modifiers() const
*/
/*!
+ * \qmlproperty int Qt3D.Input::WheelEvent::x
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty int Qt3D.Input::WheelEvent::y
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty Point Qt3D.Input::WheelEvent::angleDelta
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty int Qt3D.Input::WheelEvent::buttons
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty Modifiers Qt3D.Input::WheelEvent::modifiers
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty bool Qt3D.Input::WheelEvent::accepted
+ */
+
+/*!
* \class Qt3DInput::QWheelEvent
* \inmodule Qt3DInput
*
@@ -203,6 +288,27 @@ QMouseEvent::Modifiers QMouseEvent::modifiers() const
*/
/*!
+ * \enum Qt3DInput::QWheelEvent::Buttons
+ *
+ * \value LeftButton
+ * \value RightButton
+ * \value MiddleButton
+ * \value BackButton
+ * \value NoButton
+ */
+
+/*!
+ * \enum Qt3DInput::QWheelEvent::Modifiers
+ *
+ * \value NoModifier
+ * \value ShiftModifier
+ * \value ControlModifier
+ * \value AltModifier
+ * \value MetaModifier
+ * \value KeypadModifier
+ */
+
+/*!
* \fn int Qt3DInput::QWheelEvent::x() const
*
* Returns the x position of the mouse event.
diff --git a/src/input/frontend/qmousehandler.cpp b/src/input/frontend/qmousehandler.cpp
index 7fa7f9f2d..9f99ac5db 100644
--- a/src/input/frontend/qmousehandler.cpp
+++ b/src/input/frontend/qmousehandler.cpp
@@ -115,6 +115,51 @@ void QMouseHandlerPrivate::mouseEvent(QMouseEvent *event)
*/
/*!
+ \qmlproperty MouseDevice Qt3D.Input::MouseHandler::sourceDevice
+ */
+
+/*!
+ \qmlproperty bool Qt3D.Input::MouseHandler::containsMouse
+ \readonly
+ */
+
+/*!
+ \qmlsignal Qt3D.Input::MouseHandler::clicked()
+ */
+
+/*!
+ \qmlsignal Qt3D.Input::MouseHandler::doubleClicked()
+ */
+
+/*!
+ \qmlsignal Qt3D.Input::MouseHandler::entered()
+ */
+
+/*!
+ \qmlsignal Qt3D.Input::MouseHandler::exited()
+ */
+
+/*!
+ \qmlsignal Qt3D.Input::MouseHandler::pressed()
+ */
+
+/*!
+ \qmlsignal Qt3D.Input::MouseHandler::released()
+ */
+
+/*!
+ \qmlsignal Qt3D.Input::MouseHandler::pressAndHold()
+ */
+
+/*!
+ \qmlsignal Qt3D.Input::MouseHandler::positionChanged()
+ */
+
+/*!
+ \qmlsignal Qt3D.Input::MouseHandler::wheel()
+ */
+
+/*!
* Constructs a new QMouseHandler instance with parent \a parent.
*/
QMouseHandler::QMouseHandler(QNode *parent)
@@ -139,7 +184,9 @@ void QMouseHandler::setSourceDevice(QMouseDevice *mouseDevice)
}
/*!
- * Returns the current mouse source device of the QMouseHandler instance.
+ * \property QMouseHandler::sourceDevice
+ *
+ * Holds the current mouse source device of the QMouseHandler instance.
*/
QMouseDevice *QMouseHandler::sourceDevice() const
{
@@ -148,7 +195,9 @@ QMouseDevice *QMouseHandler::sourceDevice() const
}
/*!
- * Returns \c true if the QMouseHandler currently contains the mouse.
+ * \property QMouseHandler::containsMouse
+ *
+ * Holds \c true if the QMouseHandler currently contains the mouse.
*
* \note In this context, contains mean that the ray originating from the
* mouse is intersecting with the Qt3DCore::QEntity that aggregates the current