diff options
author | Colin Ogilvie <colin.ogilvie@kdab.com> | 2016-05-26 12:42:42 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2016-06-03 06:27:56 +0000 |
commit | 56593e2414c9c530f7abd4d7ea636b5cd2fda26f (patch) | |
tree | 17ed08884c438610575f2623c4dad4a4370b0139 | |
parent | bbb264ad66ca590513dc297821aed26d39d32008 (diff) |
More doc for input Module
Task-number: QTBUG-46037
Change-Id: Ifc90bdc84bfd44e29e9287c1e7d24108b36e900d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r-- | src/input/frontend/qabstractaxisinput.cpp | 4 | ||||
-rw-r--r-- | src/input/frontend/qaction.cpp | 1 | ||||
-rw-r--r-- | src/input/frontend/qactioninput.cpp | 36 | ||||
-rw-r--r-- | src/input/frontend/qanalogaxisinput.cpp | 5 | ||||
-rw-r--r-- | src/input/frontend/qaxis.cpp | 17 | ||||
-rw-r--r-- | src/input/frontend/qaxissetting.cpp | 27 | ||||
-rw-r--r-- | src/input/frontend/qbuttonaxisinput.cpp | 25 | ||||
-rw-r--r-- | src/input/frontend/qinputaspect.cpp | 2 | ||||
-rw-r--r-- | src/input/frontend/qinputchord.cpp | 2 | ||||
-rw-r--r-- | src/input/frontend/qinputdeviceintegration.cpp | 6 | ||||
-rw-r--r-- | src/input/frontend/qinputsettings.cpp | 12 | ||||
-rw-r--r-- | src/input/frontend/qkeyboarddevice.cpp | 8 | ||||
-rw-r--r-- | src/input/frontend/qkeyboardhandler.cpp | 252 | ||||
-rw-r--r-- | src/input/frontend/qkeyevent.cpp | 89 | ||||
-rw-r--r-- | src/input/frontend/qmousedevice.cpp | 1 | ||||
-rw-r--r-- | src/input/frontend/qmouseevent.cpp | 103 | ||||
-rw-r--r-- | src/input/frontend/qmousehandler.cpp | 60 |
17 files changed, 573 insertions, 77 deletions
diff --git a/src/input/frontend/qabstractaxisinput.cpp b/src/input/frontend/qabstractaxisinput.cpp index d21bfe24d..46d889cb4 100644 --- a/src/input/frontend/qabstractaxisinput.cpp +++ b/src/input/frontend/qabstractaxisinput.cpp @@ -50,16 +50,14 @@ namespace Qt3DInput { * \inqmlmodule Qt3D.Input * \brief QML frontend for abstract QAbstractAxisInput C++ class. * \since 5.5 - * \TODO * */ /*! * \class Qt3DInput::QAbstractAxisInput * \inmodule Qt3DInput - * \brief A QAbstractAxisInput class. + * \brief QAbstractActionInput is the base class for all Axis Input. * \since 5.5 - * \TODO * */ diff --git a/src/input/frontend/qaction.cpp b/src/input/frontend/qaction.cpp index e22469619..edbe68163 100644 --- a/src/input/frontend/qaction.cpp +++ b/src/input/frontend/qaction.cpp @@ -155,6 +155,7 @@ QVector<QAbstractActionInput *> QAction::inputs() const return d->m_inputs; } +/*! \internal */ void QAction::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) { Q_D(QAction); diff --git a/src/input/frontend/qactioninput.cpp b/src/input/frontend/qactioninput.cpp index 421836719..5bee62cb9 100644 --- a/src/input/frontend/qactioninput.cpp +++ b/src/input/frontend/qactioninput.cpp @@ -86,19 +86,6 @@ 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 \a parent. */ @@ -130,13 +117,13 @@ QVector<int> QActionInput::buttons() const The current source device of the QActionInput. */ /*! - \fn QActionInput::sourceDeviceChanged() + \fn QActionInput::sourceDeviceChanged(QAbstractPhysicalDevice *sourceDevice) - This signal is emitted when the source device ascociated with the action input is changed. + This signal is emitted when the source device associated with the action input is changed to \a sourceDevice. */ /*! - \qmlproperty QAbstractPhysicalDevice Qt3D.Input::ActionInput::sourceDevice + \qmlproperty AbstractPhysicalDevice Qt3D.Input::ActionInput::sourceDevice The current source device of the ActionInput */ @@ -144,7 +131,7 @@ QVector<int> QActionInput::buttons() const /*! \qmlsignal Qt3D.Input::ActionInput::sourceDeviceChanged() - This signal is emitted when the source device ascociated with the action input is changed. + This signal is emitted when the source device associated with the action input is changed. The corresponding handler is \c onSourceDeviceChanged */ @@ -178,27 +165,28 @@ QAbstractPhysicalDevice *QActionInput::sourceDevice() const } /*! - \fn QAbstractPhysicalDevice::buttonsChanged() + \fn QActionInput::buttonsChanged(const QVector<int> &buttons) - This signal is emitted when the buttons ascociated with the action input is changed. + This signal is emitted when the buttons associated with the action input is changed. + The buttons changed are \a buttons */ /*! - \qmlproperty QVariantList Qt3D.Input::ActionInput::buttons + \qmlproperty list<int> Qt3D.Input::ActionInput::buttons - The Buttons that can trigger this Action + The Buttons that can trigger this Action. */ /*! - \qmlsignal Qt3D.Input::ActionInput::buttonsChanged() + \qmlsignal Qt3D.Input::ActionInput::buttonsChanged(const QVector<int> &buttons) - This signal is emitted when the buttons ascociated with the action input is changed. + This signal is emitted when the buttons associated with the action input is changed. The corresponding handler is \c onbuttonsChanged */ /*! - Set the buttons to trigger the QActionInput instance. + Set the buttons to trigger the QActionInput instance to \a buttons. */ void QActionInput::setButtons(const QVector<int> &buttons) { diff --git a/src/input/frontend/qanalogaxisinput.cpp b/src/input/frontend/qanalogaxisinput.cpp index 0e8189c55..2486072b8 100644 --- a/src/input/frontend/qanalogaxisinput.cpp +++ b/src/input/frontend/qanalogaxisinput.cpp @@ -58,9 +58,10 @@ namespace Qt3DInput { /*! * \class Qt3DInput::QAnalogAxisInput * \inmodule Qt3DInput - * \brief A QAnalogAxisInput class. + * \brief An axis input controlled by an analog input * \since 5.7 - * \TODO + * The axis value is controlled like a traditional analog input such as a joystick. + * * */ diff --git a/src/input/frontend/qaxis.cpp b/src/input/frontend/qaxis.cpp index ab79432b1..88f31ff62 100644 --- a/src/input/frontend/qaxis.cpp +++ b/src/input/frontend/qaxis.cpp @@ -75,12 +75,6 @@ namespace Qt3DInput { */ /*! - \qmlproperty list<AbstractAxisInput> Qt3D.Input::Axis::inputs - - List of axis inputs. -*/ - -/*! Constructs a new QAxis instance with parent \a parent. */ QAxis::QAxis(Qt3DCore::QNode *parent) @@ -94,9 +88,9 @@ QAxis::~QAxis() } /*! - \qmlproperty QQmlListProperty<Qt3DInput::QAbstractAxisInput> Qt3D.Input::Axis::inputs + \qmlproperty list<AbstractAxisInput> Qt3D.Input::Axis::inputs - the list of QAbstractAxisInput that can trigger this Axis. + the list of AbstractAxisInput that can trigger this Axis. */ /*! @@ -126,6 +120,12 @@ void QAxis::addInput(QAbstractAxisInput *input) } /*! + \qmlproperty QVariantList Qt3D.Input::Axis::buttons + + The Buttons that can trigger this Action +*/ + +/*! QAxis::removeInput Removes an \a input from the axis. @@ -172,6 +172,7 @@ float QAxis::value() const return d->m_value; } +/*! \internal */ void QAxis::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) { Q_D(QAxis); diff --git a/src/input/frontend/qaxissetting.cpp b/src/input/frontend/qaxissetting.cpp index bbdcacc1d..987cd246a 100644 --- a/src/input/frontend/qaxissetting.cpp +++ b/src/input/frontend/qaxissetting.cpp @@ -66,16 +66,9 @@ namespace Qt3DInput { */ /*! - \qmlproperty real AxisSetting::deadZoneRadius - */ - -/*! \qmlproperty list<int> AxisSetting::axes */ -/*! - \qmlproperty bool AxisSetting::smooth - */ /*! Constructs a new QAxisSetting instance with \a parent. @@ -134,9 +127,9 @@ bool QAxisSetting::isSmoothEnabled() const /*! - \fn QAxisSetting::deadZoneRadiusChanged() + \fn QAxisSetting::deadZoneRadiusChanged(float deadZoneRadius) - This signal is emitted when the Dead Zone radius associated with the axis setting is changed. + This signal is emitted when the Dead Zone radius associated with the axis setting is changed to \a deadZoneRadius. */ /*! @@ -154,7 +147,7 @@ bool QAxisSetting::isSmoothEnabled() const */ /*! - Set the current dead zone radius of the QAxisSetting instance. + Set the current dead zone radius of the QAxisSetting instance to \a deadZoneRadius. */ void QAxisSetting::setDeadZoneRadius(float deadZoneRadius) { @@ -167,9 +160,9 @@ void QAxisSetting::setDeadZoneRadius(float deadZoneRadius) } /*! - \fn QAxisSetting::axisChanged() + \fn QAxisSetting::axesChanged(const QVector<int> &axes) - This signal is emitted when the axis ascociated with the axis setting is changed. + This signal is emitted when the axes associated with the axis setting is changed to \a axes. */ /*! @@ -181,13 +174,13 @@ void QAxisSetting::setDeadZoneRadius(float deadZoneRadius) /*! \qmlsignal Qt3D.Input::AxisSetting::axisChanged() - This signal is emitted when the axis ascociated with the axis setting is changed. + This signal is emitted when the axis associated with the axis setting is changed. The corresponding handler is \c onAxisChanged */ /*! - Set the current axis of the QAxisSetting instance. + Set the current axes of the QAxisSetting instance to \a axes. */ void QAxisSetting::setAxes(const QVector<int> &axes) { @@ -200,9 +193,9 @@ void QAxisSetting::setAxes(const QVector<int> &axes) } /*! - \fn QAxisSetting::smoothChanged() + \fn QAxisSetting::smoothChanged(bool smooth) - This signal is emitted when the smoothing state is changed. + This signal is emitted when the smoothing state is changed to \a smooth. */ /*! @@ -220,7 +213,7 @@ void QAxisSetting::setAxes(const QVector<int> &axes) */ /*! - Set the current state of the QAxisSettings smoothing. + Set the current state of the QAxisSettings smoothing to \a enabled. */ void QAxisSetting::setSmoothEnabled(bool enabled) { diff --git a/src/input/frontend/qbuttonaxisinput.cpp b/src/input/frontend/qbuttonaxisinput.cpp index 9d0d3b049..6d95ad187 100644 --- a/src/input/frontend/qbuttonaxisinput.cpp +++ b/src/input/frontend/qbuttonaxisinput.cpp @@ -51,16 +51,16 @@ namespace Qt3DInput { * \inqmlmodule Qt3D.Input * \brief QML frontend for QButtonAxisInput C++ class. * \since 5.7 - * \TODO + * The axis value is controlled by buttons rather than a traditional analog input such as a joystick. * */ /*! * \class Qt3DInput::QButtonAxisInput * \inmodule Qt3DInput - * \brief A QButtonAxisInput class. + * \brief An axis input controlled by buttons * \since 5.7 - * \TODO + * The axis value is controlled by buttons rather than a traditional analog input such as a joystick. * */ /*! @@ -69,8 +69,18 @@ namespace Qt3DInput { /*! \qmlproperty list<var> ButtonAxisInput::buttons + Specifies the buttons which control the axis */ +/*! + \qmlproperty real ButtonAxisInput::acceleration + Specifies the rate at which the axis value changes when a button is held +*/ + +/*! + \qmlproperty list<var> ButtonAxisInput::deceleration + Specifies the rate at which the axis value returns to normal when a button is released +*/ /*! Constructs a new QButtonAxisInput instance with \a parent. @@ -105,6 +115,7 @@ float QButtonAxisInput::scale() const /*! \property QButtonAxisInput::buttons + Specifies the buttons which control the axis */ void QButtonAxisInput::setButtons(const QVector<int> &buttons) { @@ -121,6 +132,10 @@ QVector<int> QButtonAxisInput::buttons() const return d->m_buttons; } +/*! + \property QButtonAxisInput::acceleration + Specifies the rate at which the axis value changes when a button is held + */ float QButtonAxisInput::acceleration() const { Q_D(const QButtonAxisInput); @@ -136,6 +151,10 @@ void QButtonAxisInput::setAcceleration(float acceleration) } } +/*! + \property QButtonAxisInput::deceleration + Specifies the rate at which the axis value returns to normal when a button is released + */ float QButtonAxisInput::deceleration() const { Q_D(const QButtonAxisInput); diff --git a/src/input/frontend/qinputaspect.cpp b/src/input/frontend/qinputaspect.cpp index 0b7df1299..d544bed70 100644 --- a/src/input/frontend/qinputaspect.cpp +++ b/src/input/frontend/qinputaspect.cpp @@ -106,7 +106,7 @@ QInputAspectPrivate::QInputAspectPrivate() \class Qt3DInput::QInputAspect \inherits Qt3DCore::QAbstractAspect \inmodule Qt3DInput - \brief A QInputAspect class. + \brief Responsible for creating physical devices and handling associated jobs. \since 5.5 \brief Handles mapping between front and backend nodes diff --git a/src/input/frontend/qinputchord.cpp b/src/input/frontend/qinputchord.cpp index 2753b53f0..372c61990 100644 --- a/src/input/frontend/qinputchord.cpp +++ b/src/input/frontend/qinputchord.cpp @@ -127,7 +127,7 @@ int QInputChord::timeout() const } /*! - Sets the time in which all QAbstractActionInput's in the input chord must triggered within. + Sets the time in which all QAbstractActionInput's in the input chord must triggered within to \a timeout. The time is in milliseconds */ void QInputChord::setTimeout(int timeout) diff --git a/src/input/frontend/qinputdeviceintegration.cpp b/src/input/frontend/qinputdeviceintegration.cpp index 01f6b931e..d7f802727 100644 --- a/src/input/frontend/qinputdeviceintegration.cpp +++ b/src/input/frontend/qinputdeviceintegration.cpp @@ -106,7 +106,7 @@ QInputAspect *QInputDeviceIntegration::inputAspect() const } // namespace Qt3DInput /*! - \fn QInputDeviceIntegration::createPhysicalDevice() + \fn QInputDeviceIntegration::createPhysicalDevice(const QString &name) Create the Physical device identified by \a name. @@ -114,13 +114,13 @@ QInputAspect *QInputDeviceIntegration::inputAspect() const */ /*! - \fn QInputDeviceIntegration::physicalDevices() + \fn QInputDeviceIntegration::physicalDevices() const \return the list of node ids for physical devices associated with this QInputDeviceIntegration. */ /*! - \fn QInputDeviceIntegration::physicalDevice(Qt3DCore::QNodeId id) + \fn QInputDeviceIntegration::physicalDevice(Qt3DCore::QNodeId id) const \return the QAbstractPhysicalDevice identified by the given id if it is related to this QInputDeviceIntegration. */ diff --git a/src/input/frontend/qinputsettings.cpp b/src/input/frontend/qinputsettings.cpp index 4034dec38..86192a4b3 100644 --- a/src/input/frontend/qinputsettings.cpp +++ b/src/input/frontend/qinputsettings.cpp @@ -65,10 +65,6 @@ namespace Qt3DInput { \since 5.7 */ -/*! - \qmlproperty Object Qt3D.Input::InputSettings::eventSource - */ - QInputSettingsPrivate::QInputSettingsPrivate() : Qt3DCore::QComponentPrivate() , m_eventSource(nullptr) @@ -94,9 +90,9 @@ QInputSettings::~QInputSettings() Holds the source for the QInputSettings. */ /*! - \fn QInputSettings::eventSourceChanged() + \fn QInputSettings::eventSourceChanged(QObject *) - This signal is emitted when the even source ascociated with the input setting is changed. + This signal is emitted when the even source associated with the input setting is changed. */ /*! @@ -106,7 +102,7 @@ QInputSettings::~QInputSettings() */ /*! - \qmlsignal Qt3D.Input::InputSettings::eventSourceChanged() + \qmlsignal Qt3D.Input::InputSettings::ventSourceChanged(QObject *) This signal is emitted when the even source associated with the input setting is changed. @@ -124,7 +120,7 @@ QObject *QInputSettings::eventSource() const } /*! - Set the current event source of the QInputSettings instance. + Set the current event source of the QInputSettings instance to \a eventSource. */ void QInputSettings::setEventSource(QObject *eventSource) { diff --git a/src/input/frontend/qkeyboarddevice.cpp b/src/input/frontend/qkeyboarddevice.cpp index dd0a1df9a..b2c0975ee 100644 --- a/src/input/frontend/qkeyboarddevice.cpp +++ b/src/input/frontend/qkeyboarddevice.cpp @@ -203,7 +203,8 @@ QKeyboardDevicePrivate::QKeyboardDevicePrivate() /*! \class Qt3DInput::QKeyboardDevice \inmodule Qt3DInput - \brief A QKeyboardDevice class. + \brief QKeyboardDevice is in charge of dispatching keyboard events to + attached QQKeyboardHandler objects. \since 5.5 */ @@ -307,6 +308,7 @@ QKeyboardDevice::QKeyboardDevice(QKeyboardDevicePrivate &dd, QNode *parent) { } +/*! \internal */ void QKeyboardDevice::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) { Q_D(QKeyboardDevice); @@ -316,7 +318,9 @@ void QKeyboardDevice::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) setActiveInput(qobject_cast<QKeyboardHandler *>(d->scene()->lookupNode(activeInputId))); } } - +/*! + * Set the active input to \a activeInput + */ void QKeyboardDevice::setActiveInput(QKeyboardHandler *activeInput) { Q_D(QKeyboardDevice); diff --git a/src/input/frontend/qkeyboardhandler.cpp b/src/input/frontend/qkeyboardhandler.cpp index 75bc7c52b..e45609f74 100644 --- a/src/input/frontend/qkeyboardhandler.cpp +++ b/src/input/frontend/qkeyboardhandler.cpp @@ -143,7 +143,7 @@ void QKeyboardHandlerPrivate::keyEvent(QKeyEvent *event) /*! \class Qt3DInput::QKeyboardHandler \inmodule Qt3DInput - \brief A QKeyboardHandler class. + \brief Provides keyboard event notification \since 5.5 */ @@ -169,6 +169,7 @@ QKeyboardHandler::~QKeyboardHandler() { } +/*! \internal */ void QKeyboardHandler::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) { Q_D(QKeyboardHandler); @@ -267,168 +268,411 @@ Qt3DCore::QNodeCreatedChangeBasePtr QKeyboardHandler::createNodeCreationChange() /*! \qmlsignal Qt3D.Input::KeyboardHandler::digit0Pressed(KeyEvent event) + This signal is emitted when the 0 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::digit1Pressed(KeyEvent event) + This signal is emitted when the 1 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::digit2Pressed(KeyEvent event) + This signal is emitted when the 2 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::digit3Pressed(KeyEvent event) + This signal is emitted when the 3 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::digit4Pressed(KeyEvent event) + This signal is emitted when the 4 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::digit5Pressed(KeyEvent event) + This signal is emitted when the 5 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::digit6Pressed(KeyEvent event) + This signal is emitted when the 6 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::digit7Pressed(KeyEvent event) + This signal is emitted when the 7 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::digit8Pressed(KeyEvent event) + This signal is emitted when the 8 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::digit9Pressed(KeyEvent event) + This signal is emitted when the 9 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::leftPressed(KeyEvent event) + This signal is emitted when the left key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::rightPressed(KeyEvent event) + This signal is emitted when the right key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::upPressed(KeyEvent event) + This signal is emitted when the up key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::downPressed(KeyEvent event) + This signal is emitted when the down key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::tabPressed(KeyEvent event) + This signal is emitted when the tab key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::backtabPressed(KeyEvent event) + This signal is emitted when the backtab key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::asteriskPressed(KeyEvent event) + This signal is emitted when the * key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::numberSignPressed(KeyEvent event) -*/ + This signal is emitted when the number sign key is pressed with the event details being contained within \a event -/*! - \qmlsignal Qt3D.Input::KeyboardHandler::backtabPressed(KeyEvent event) */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::escapePressed(KeyEvent event) + This signal is emitted when the escape key is pressed with the event details being contained within \a event + */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::returnPressed(KeyEvent event) + This signal is emitted when the return key is pressed with the event details being contained within \a event + */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::enterPressed(KeyEvent event) + This signal is emitted when the enter key is pressed with the event details being contained within \a event + */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::deletePressed(KeyEvent event) + This signal is emitted when the delete key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::spacePressed(KeyEvent event) + This signal is emitted when the space key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::backPressed(KeyEvent event) + This signal is emitted when the back key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::cancelPressed(KeyEvent event) + This signal is emitted when the cancel key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::selectPressed(KeyEvent event) + This signal is emitted when the select key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::yesPressed(KeyEvent event) + This signal is emitted when the yes key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::noPressed(KeyEvent event) + This signal is emitted when the yes key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::context1Pressed(KeyEvent event) + This signal is emitted when the context 1 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::context2Pressed(KeyEvent event) + This signal is emitted when the context 2 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::context3Pressed(KeyEvent event) + This signal is emitted when the context 2 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::context4Pressed(KeyEvent event) + This signal is emitted when the context 4 key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::callPressed(KeyEvent event) + This signal is emitted when the call key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::hangupPressed(KeyEvent event) + This signal is emitted when the hangup key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::flipPressed(KeyEvent event) + This signal is emitted when the flip key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::menuPressed(KeyEvent event) + This signal is emitted when the menu key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::volumeUpPressed(KeyEvent event) + This signal is emitted when the volume up key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::volumeDownPressed(KeyEvent event) + This signal is emitted when the volume down key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::pressed(KeyEvent event) + This signal is emitted when a key is pressed with the event details being contained within \a event */ /*! \qmlsignal Qt3D.Input::KeyboardHandler::released(KeyEvent event) + This signal is emitted when a key is released with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::digit0Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the 0 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::digit1Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the 1 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::digit2Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the 2 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::digit3Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the 3 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::digit4Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the 4 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::digit5Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the 5 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::digit6Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the 6 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::digit7Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the 7 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::digit8Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the 8 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::digit9Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the 9 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::leftPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the left key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::rightPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the right key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::upPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the up key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::downPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the down key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::tabPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the tab key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::backtabPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the backtab key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::asteriskPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the * key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::numberSignPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the number sign key is pressed with the event details being contained within \a event + +*/ + +/*! + \fn QKeyboardHandler::escapePressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the escape key is pressed with the event details being contained within \a event + +*/ + +/*! + \fn QKeyboardHandler::returnPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the return key is pressed with the event details being contained within \a event + +*/ + +/*! + \fn QKeyboardHandler::enterPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the enter key is pressed with the event details being contained within \a event + +*/ + +/*! + \fn QKeyboardHandler::deletePressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the delete key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::spacePressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the space key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::backPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the back key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::cancelPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the cancel key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::selectPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the select key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::yesPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the yes key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::noPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the yes key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::context1Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the context 1 key is pressed with the event details being contained within \a event */ +/*! + \fn QKeyboardHandler::context2Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the context 2 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::context3Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the context 2 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::context4Pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the context 4 key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::callPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the call key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::hangupPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the hangup key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::flipPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the flip key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::menuPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the menu key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::volumeUpPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the volume up key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::volumeDownPressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when the volume down key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::pressed(Qt3DInput::QKeyEvent *event) + This signal is emitted when a key is pressed with the event details being contained within \a event +*/ + +/*! + \fn QKeyboardHandler::released(Qt3DInput::QKeyEvent *event) + This signal is emitted when a key is released with the event details being contained within \a event +*/ } // namespace Qt3DInput QT_END_NAMESPACE diff --git a/src/input/frontend/qkeyevent.cpp b/src/input/frontend/qkeyevent.cpp index 49da8b92b..2d9226c4e 100644 --- a/src/input/frontend/qkeyevent.cpp +++ b/src/input/frontend/qkeyevent.cpp @@ -65,6 +65,13 @@ namespace Qt3DInput { are used as signal parameters in KeyboardHandler. */ +/*! + * \typedef Qt3DInput::QKeyEventPtr + * \relates Qt3DInput::QKeyEvent + * + * A shared pointer for QKeyEvent. + */ + QKeyEvent::QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString &text, bool autorep, ushort count) : QObject() , m_event(type, key, modifiers, text, autorep, count) @@ -131,7 +138,7 @@ QKeyEvent::~QKeyEvent() */ /*! - \qmlproperty quint32 Qt3D.Input::KeyEvent::nativeScanCodei + \qmlproperty quint32 Qt3D.Input::KeyEvent::nativeScanCode \readonly This property contains the native scan code of the key that was pressed. @@ -159,6 +166,86 @@ QKeyEvent::~QKeyEvent() \sa QKeySequence::StandardKey */ +/*! + \property QKeyEvent::key + \readonly + + This property holds the code of the key that was pressed or released. + + See \l [CPP] {Qt::Key}{Qt.Key} for the list of keyboard codes. + + \sa {QKeyEvent::key} +*/ + +/*! + \property QKeyEvent::text + \readonly + + This property holds the Unicode text that the key generated. The text + returned can be an empty string in cases where modifier keys, such as + Shift, Control, Alt, and Meta, are being pressed or released. In such + cases \l key will contain a valid value. +*/ + +/*! + \property QKeyEvent::modifiers + \readonly + + This property holds the keyboard modifier flags that existed immediately + before the event occurred. + + \sa {QKeyEvent::modifiers} +*/ + +/*! + \property QKeyEvent::isAutoRepeat + \readonly + + Holds whether this event comes from an auto-repeating key. +*/ + +/*! + \property QKeyEvent::count + \readonly + + Holds the number of keys involved in this event. If \l text is not empty, + this is simply the length of the string. +*/ + +/*! + \property QKeyEvent::nativeScanCode + \readonly + + This property contains the native scan code of the key that was pressed. + It is passed through from QKeyEvent unchanged. + +*/ + +/*! + \property QKeyEvent::accepted + + Setting \e accepted to \c true prevents the key event from being propagated + to the item's parent. + + Generally, if the item acts on the key event then it should be accepted so + that ancestor items do not also respond to the same event. +*/ + +/*! + \fn bool QKeyEvent::matches(QKeySequence::StandardKey key_) const + + \return \c true if the key event matches the given standard key \a key_; otherwise + returns \c false. + + \sa QKeySequence::StandardKey +*/ + +/*! + \fn QEvent::Type QKeyEvent::type() const + \return the type of event + +*/ + } // namespace Qt3DInput QT_END_NAMESPACE diff --git a/src/input/frontend/qmousedevice.cpp b/src/input/frontend/qmousedevice.cpp index c7be4d5e9..d0ae0317d 100644 --- a/src/input/frontend/qmousedevice.cpp +++ b/src/input/frontend/qmousedevice.cpp @@ -179,6 +179,7 @@ void QMouseDevice::setSensitivity(float value) emit sensitivityChanged(value); } +/*! \internal */ void QMouseDevice::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) { Q_UNUSED(change); diff --git a/src/input/frontend/qmouseevent.cpp b/src/input/frontend/qmouseevent.cpp index 4fe8277ef..ff557ba8a 100644 --- a/src/input/frontend/qmouseevent.cpp +++ b/src/input/frontend/qmouseevent.cpp @@ -66,36 +66,43 @@ namespace Qt3DInput { /*! * \qmlproperty int Qt3D.Input::MouseEvent::x + * Specifies The X coordinate of the mouse event * \readonly */ /*! * \qmlproperty int Qt3D.Input::MouseEvent::y + * Specifies The Y coordinate of the mouse event * \readonly */ /*! * \qmlproperty bool Qt3D.Input::MouseEvent::wasHeld + * Specifies if a mouse button was held down during the mouse event * \readonly */ /*! * \qmlproperty Buttons Qt3D.Input::MouseEvent::button + * Specifies the button triggering the mouse event * \readonly */ /*! * \qmlproperty int Qt3D.Input::MouseEvent::buttons + * Specifies the button triggering the mouse event * \readonly */ /*! * \qmlproperty Modifiers Qt3D.Input::MouseEvent::modifiers + * Specifies if any modifiers were applied to the mouse event * \readonly */ /*! * \qmlproperty bool Qt3D.Input::MouseEvent::accepted + * Specifies if the mouse event has been accepted */ /*! @@ -114,6 +121,46 @@ namespace Qt3DInput { * */ +/*! + * \property QMouseEvent::x + * Specifies The X coordinate of the mouse event + * \readonly + */ + +/*! + * \property QMouseEvent::y + * Specifies The y coordinate of the mouse event + * \readonly + */ + +/*! + * \property QMouseEvent::wasHeld + * Specifies if a mouse button was held down during the mouse event + * \readonly + */ + +/*! + * \property QMouseEvent::button + * Specifies the button triggering the mouse event + * \readonly + */ + +/*! + * \property QMouseEvent::buttons + * Specifies the button triggering the mouse event + * \readonly + */ + +/*! + * \property QMouseEvent::modifiers + * Specifies if any modifiers were applied to the mouse event + * \readonly + */ + +/*! + * \property QMouseEvent::accepted + * Specifies if the mouse event has been accepted + */ /*! * \enum Qt3DInput::QMouseEvent::Buttons @@ -137,6 +184,13 @@ namespace Qt3DInput { */ /*! + * \typedef Qt3DInput::QMouseEventPtr + * \relates Qt3DInput::QMouseEvent + * + * A shared pointer for QMouseEvent. + */ + +/*! * \fn int Qt3DInput::QMouseEvent::x() const * * Returns the x position of the mouse event. @@ -246,31 +300,37 @@ QMouseEvent::Modifiers QMouseEvent::modifiers() const /*! * \qmlproperty int Qt3D.Input::WheelEvent::x + * Specifies The X coordinate of the mouse wheel event * \readonly */ /*! * \qmlproperty int Qt3D.Input::WheelEvent::y + * Specifies The Y coordinate of the mouse wheel event * \readonly */ /*! * \qmlproperty Point Qt3D.Input::WheelEvent::angleDelta + * Specifies The change wheel angle of the mouse wheel event * \readonly */ /*! * \qmlproperty int Qt3D.Input::WheelEvent::buttons + * Specifies the button if present in the mouse wheel event * \readonly */ /*! * \qmlproperty Modifiers Qt3D.Input::WheelEvent::modifiers + * Specifies if any modifiers were applied to the mouse wheel event * \readonly */ /*! * \qmlproperty bool Qt3D.Input::WheelEvent::accepted + * Specifies if the mouse wheel event has been accepted */ /*! @@ -288,6 +348,41 @@ QMouseEvent::Modifiers QMouseEvent::modifiers() const */ /*! + * \property QWheelEvent::x + * Specifies The X coordinate of the mouse wheel event + * \readonly + */ + +/*! + * \property QWheelEvent::y + * Specifies The Y coordinate of the mouse wheel event + * \readonly + */ + +/*! + * \property QWheelEvent::angleDelta + * Specifies The change wheel angle of the mouse wheel event + * \readonly + */ + +/*! + * \property QWheelEvent::buttons + * Specifies the button if present in the mouse wheel event + * \readonly + */ + +/*! + * \property QWheelEvent::modifiers + * Specifies if any modifiers were applied to the mouse wheel event + * \readonly + */ + +/*! + * \property QWheelEvent::accepted + * Specifies if the mouse wheel event has been accepted + */ + +/*! * \enum Qt3DInput::QWheelEvent::Buttons * * \value LeftButton @@ -308,6 +403,14 @@ QMouseEvent::Modifiers QMouseEvent::modifiers() const * \value KeypadModifier */ + +/*! + * \typedef Qt3DInput::QWheelEventPtr + * \relates Qt3DInput::QWheelEvent + * + * A shared pointer for QWheelEvent. + */ + /*! * \fn int Qt3DInput::QWheelEvent::x() const * diff --git a/src/input/frontend/qmousehandler.cpp b/src/input/frontend/qmousehandler.cpp index 9f99ac5db..969e4db39 100644 --- a/src/input/frontend/qmousehandler.cpp +++ b/src/input/frontend/qmousehandler.cpp @@ -116,19 +116,23 @@ void QMouseHandlerPrivate::mouseEvent(QMouseEvent *event) /*! \qmlproperty MouseDevice Qt3D.Input::MouseHandler::sourceDevice + Holds the current mouse source device of the MouseHandler instance. */ /*! \qmlproperty bool Qt3D.Input::MouseHandler::containsMouse \readonly + Holds \c true if the QMouseHandler currently contains the mouse. */ /*! \qmlsignal Qt3D.Input::MouseHandler::clicked() + This signal is emitted when a mouse button is clicked */ /*! \qmlsignal Qt3D.Input::MouseHandler::doubleClicked() + This signal is emitted when a mouse button is double clicked */ /*! @@ -141,22 +145,76 @@ void QMouseHandlerPrivate::mouseEvent(QMouseEvent *event) /*! \qmlsignal Qt3D.Input::MouseHandler::pressed() + This signal is emitted when a mouse button is pressed */ /*! \qmlsignal Qt3D.Input::MouseHandler::released() + This signal is emitted when a mouse button is released */ /*! \qmlsignal Qt3D.Input::MouseHandler::pressAndHold() + This signal is emitted when a mouse button is pressed and held down */ /*! \qmlsignal Qt3D.Input::MouseHandler::positionChanged() + This signal is emitted when the mouse position changes */ /*! \qmlsignal Qt3D.Input::MouseHandler::wheel() + This signal is emitted when the mouse wheel is used + */ + + + +/*! + \fn QMouseHandler::clicked(Qt3DInput::QMouseEvent *mouse) + This signal is emitted when a mouse button is clicked with the event details being contained within \a mouse + */ + +/*! + \fn QMouseHandler::doubleClicked(Qt3DInput::QMouseEvent *mouse) + This signal is emitted when a mouse button is double clicked with the event details being contained within \a mouse + + */ + +/*! + \fn QMouseHandler::entered() + */ + +/*! + \fn QMouseHandler::exited() + */ + +/*! + \fn QMouseHandler::pressed(Qt3DInput::QMouseEvent *mouse) + This signal is emitted when a mouse button is pressed with the event details being contained within \a mouse + */ + +/*! + \fn QMouseHandler::released(Qt3DInput::QMouseEvent *mouse) + This signal is emitted when a mouse button is released with the event details being contained within \a mouse + + */ + +/*! + \fn QMouseHandler::pressAndHold(Qt3DInput::QMouseEvent *mouse) + This signal is emitted when a mouse button is pressed and held down with the event details being contained within \a mouse + */ + +/*! + \fn QMouseHandler::positionChanged(Qt3DInput::QMouseEvent *mouse) + This signal is emitted when the mouse position changes with the event details being contained within \a mouse + + */ + +/*! + \fn QMouseHandler::wheel(Qt3DInput::QWheelEvent *wheel) + This signal is emitted when the mouse wheel is used with the event details being contained within \a wheel + */ /*! @@ -209,6 +267,7 @@ bool QMouseHandler::containsMouse() const return d->m_containsMouse; } +/*! \internal */ void QMouseHandler::setContainsMouse(bool contains) { Q_D(QMouseHandler); @@ -218,6 +277,7 @@ void QMouseHandler::setContainsMouse(bool contains) } } +/*! \internal */ void QMouseHandler::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) { Q_D(QMouseHandler); |