diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2016-06-14 11:09:40 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-06-14 11:56:00 +0100 |
commit | cbe8673f32fd6f101c5a1bcc272884196a648f28 (patch) | |
tree | 477e70d9dc191578f08ed30ec4d3fe28efda7320 /src/input | |
parent | 6cf83207ee249c2b25b6ee32d8b09c83116c9cf0 (diff) | |
parent | eb3fed53f75abd15203d4c749e4815a74f1fccb2 (diff) |
Merge branch '5.7.0' into 5.7
Change-Id: I6e7f3fded06f8295f33998196e826ac6d4b1513e
Diffstat (limited to 'src/input')
-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 | 56 | ||||
-rw-r--r-- | src/input/frontend/qanalogaxisinput.cpp | 5 | ||||
-rw-r--r-- | src/input/frontend/qaxis.cpp | 50 | ||||
-rw-r--r-- | src/input/frontend/qaxissetting.cpp | 125 | ||||
-rw-r--r-- | src/input/frontend/qbuttonaxisinput.cpp | 25 | ||||
-rw-r--r-- | src/input/frontend/qinputaspect.cpp | 19 | ||||
-rw-r--r-- | src/input/frontend/qinputchord.cpp | 2 | ||||
-rw-r--r-- | src/input/frontend/qinputdeviceintegration.cpp | 42 | ||||
-rw-r--r-- | src/input/frontend/qinputsequence.cpp | 4 | ||||
-rw-r--r-- | src/input/frontend/qinputsettings.cpp | 40 | ||||
-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 | 91 | ||||
-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 |
18 files changed, 799 insertions, 89 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 e15f7517b..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. */ @@ -129,6 +116,25 @@ QVector<int> QActionInput::buttons() const The current source device of the QActionInput. */ +/*! + \fn QActionInput::sourceDeviceChanged(QAbstractPhysicalDevice *sourceDevice) + + This signal is emitted when the source device associated with the action input is changed to \a sourceDevice. +*/ + +/*! + \qmlproperty AbstractPhysicalDevice Qt3D.Input::ActionInput::sourceDevice + + The current source device of the ActionInput +*/ + +/*! + \qmlsignal Qt3D.Input::ActionInput::sourceDeviceChanged() + + This signal is emitted when the source device associated with the action input is changed. + + The corresponding handler is \c onSourceDeviceChanged +*/ void QActionInput::setSourceDevice(QAbstractPhysicalDevice *sourceDevice) { Q_D(QActionInput); @@ -158,6 +164,30 @@ QAbstractPhysicalDevice *QActionInput::sourceDevice() const return d->m_sourceDevice; } +/*! + \fn QActionInput::buttonsChanged(const QVector<int> &buttons) + + This signal is emitted when the buttons associated with the action input is changed. + The buttons changed are \a buttons +*/ + +/*! + \qmlproperty list<int> Qt3D.Input::ActionInput::buttons + + The Buttons that can trigger this Action. +*/ + +/*! + \qmlsignal Qt3D.Input::ActionInput::buttonsChanged(const QVector<int> &buttons) + + 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 to \a buttons. + */ 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 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 212405351..88f31ff62 100644 --- a/src/input/frontend/qaxis.cpp +++ b/src/input/frontend/qaxis.cpp @@ -49,22 +49,23 @@ QT_BEGIN_NAMESPACE namespace Qt3DInput { /*! - * \qmltype Axis - * \inqmlmodule Qt3D.Input - * \brief QML frontend for QAxis C++ class. - * \since 5.5 - * \TODO - * - */ + Constructs a new QAxis instance with \a parent. + \class Qt3DInput::QAxis + \inmodule Qt3DInput + \inherits Qt3DCore::QNode + \brief QAxis stores QAbstractAxisInputs used to trigger an input event. + \since 5.7 +*/ /*! - * \class Qt3DInput::QAxis - * \inmodule Qt3DInput - * \brief A QAxis class. - * \since 5.5 - * \TODO - * - */ + \qmltype Axis + \inqmlmodule Qt3D.Input + \instantiates Qt3DInput::QAxis + \brief QML frontend for the Qt3DInput::QAxis C++ class. + + Links a set of AbstractAxisInputs that trigger the same event. + \since 5.7 +*/ /*! \qmlproperty int QAxis::value @@ -74,13 +75,7 @@ namespace Qt3DInput { */ /*! - \qmlproperty list<AbstractAxisInput> Qt3D.Input::Axis::inputs - - List of axis inputs. -*/ - -/*! - Constructs a new QAxis instance with \a parent. + Constructs a new QAxis instance with parent \a parent. */ QAxis::QAxis(Qt3DCore::QNode *parent) : Qt3DCore::QNode(*new QAxisPrivate(), parent) @@ -93,6 +88,12 @@ QAxis::~QAxis() } /*! + \qmlproperty list<AbstractAxisInput> Qt3D.Input::Axis::inputs + + the list of AbstractAxisInput that can trigger this Axis. +*/ + +/*! QAxis::addInput Adds an \a input for the axis. @@ -119,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. @@ -165,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 37013f74c..987cd246a 100644 --- a/src/input/frontend/qaxissetting.cpp +++ b/src/input/frontend/qaxissetting.cpp @@ -44,37 +44,31 @@ QT_BEGIN_NAMESPACE namespace Qt3DInput { - /*! - * \qmltype AxisSetting - * \instantiates Qt3DInput::QAxisSetting - * \inqmlmodule Qt3D.Input - * \brief QML frontend for QAxisSetting C++ class. - * \since 5.5 - * \TODO - * - */ - -/*! - * \class Qt3DInput::QAxisSetting - * \inmodule Qt3DInput - * \brief A QAxisSetting class. - * \since 5.5 - * \TODO - * - */ + \class Qt3DInput::QAxisSetting + \inmodule Qt3DInput + \inherits Qt3DCore::QNode + \brief QAxisSetting stores settings for the specified list of Axis. -/*! - \qmlproperty real AxisSetting::deadZoneRadius + Stores the dead zone associated with this axis and defines if smoothing is enabled + \since 5.5 */ /*! - \qmlproperty list<int> AxisSetting::axes + + \qmltype AxisSetting + \inqmlmodule Qt3D.Input + \instantiates Qt3DInput::QAxisSetting + \brief QML frontend for the Qt3DInput::QAxisSetting C++ class. + + Stores settings for the specified list of Axis + \since 5.5 */ /*! - \qmlproperty bool AxisSetting::smooth -*/ + \qmlproperty list<int> AxisSetting::axes + */ + /*! Constructs a new QAxisSetting instance with \a parent. @@ -92,6 +86,11 @@ QAxisSetting::~QAxisSetting() /*! \property QAxisSetting::axes */ + +/*! + * \brief QAxisSetting::axes + * \return the current list of Axis these settings apply to. + */ QVector<int> QAxisSetting::axes() const { Q_D(const QAxisSetting); @@ -101,6 +100,11 @@ QVector<int> QAxisSetting::axes() const /*! \property QAxisSetting::deadZoneRadius */ + +/*! + * \brief QAxisSetting::deadZoneRadius + * \return the set dead zone radius. + */ float QAxisSetting::deadZoneRadius() const { Q_D(const QAxisSetting); @@ -110,12 +114,41 @@ float QAxisSetting::deadZoneRadius() const /*! \property QAxisSetting::smooth */ + +/*! + * \brief QAxisSetting::isSmoothEnabled + * \return if smoothing is enabled. + */ bool QAxisSetting::isSmoothEnabled() const { Q_D(const QAxisSetting); return d->m_smooth; } + +/*! + \fn QAxisSetting::deadZoneRadiusChanged(float deadZoneRadius) + + This signal is emitted when the Dead Zone radius associated with the axis setting is changed to \a deadZoneRadius. +*/ + +/*! + \qmlproperty float Qt3D.Input::AxisSetting::deadZoneRadius + + The current deadZone radius of the AxisSetting +*/ + +/*! + \qmlsignal Qt3D.Input::AxisSetting::deadZoneRadiusChanged() + + This signal is emitted when the dead zone associated with the axis setting is changed. + + The corresponding handler is \c onDeadZoneRadiusChanged +*/ + +/*! + Set the current dead zone radius of the QAxisSetting instance to \a deadZoneRadius. + */ void QAxisSetting::setDeadZoneRadius(float deadZoneRadius) { Q_D(QAxisSetting); @@ -126,6 +159,29 @@ void QAxisSetting::setDeadZoneRadius(float deadZoneRadius) emit deadZoneRadiusChanged(deadZoneRadius); } +/*! + \fn QAxisSetting::axesChanged(const QVector<int> &axes) + + This signal is emitted when the axes associated with the axis setting is changed to \a axes. +*/ + +/*! + \qmlproperty QVariantList Qt3D.Input::AxisSetting::axis + + The current axis of the AxisSetting +*/ + +/*! + \qmlsignal Qt3D.Input::AxisSetting::axisChanged() + + This signal is emitted when the axis associated with the axis setting is changed. + + The corresponding handler is \c onAxisChanged +*/ + +/*! + Set the current axes of the QAxisSetting instance to \a axes. + */ void QAxisSetting::setAxes(const QVector<int> &axes) { Q_D(QAxisSetting); @@ -136,6 +192,29 @@ void QAxisSetting::setAxes(const QVector<int> &axes) emit axesChanged(axes); } +/*! + \fn QAxisSetting::smoothChanged(bool smooth) + + This signal is emitted when the smoothing state is changed to \a smooth. +*/ + +/*! + \qmlproperty bool Qt3D.Input::AxisSetting::smooth + + The current state of smoothing +*/ + +/*! + \qmlsignal Qt3D.Input::AxisSetting::smoothChanged() + + This signal is emitted when the when the smoothing state is changed. + + The corresponding handler is \c onSmoothChanged +*/ + +/*! + Set the current state of the QAxisSettings smoothing to \a enabled. + */ void QAxisSetting::setSmoothEnabled(bool enabled) { Q_D(QAxisSetting); 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 fbd7674d8..d544bed70 100644 --- a/src/input/frontend/qinputaspect.cpp +++ b/src/input/frontend/qinputaspect.cpp @@ -106,8 +106,12 @@ 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 + + QInputAspect is responsible for creating physical devices. + It is also the object responsible establishing the jobs to run at a particular time from the current input setup. */ /*! @@ -156,6 +160,9 @@ QInputAspect::~QInputAspect() { } +/*! + Create each of the detected input device integrations through the Integration Factory + */ void QInputAspectPrivate::loadInputDevicePlugins() { const QStringList keys = QInputDeviceIntegrationFactory::keys(); @@ -172,12 +179,12 @@ void QInputAspectPrivate::loadInputDevicePlugins() } } - /*! - Creates a physical device with \a name. - - \note The caller is responsible for ownership. - */ + Create a physical device identified by \a name using the input device integrations present + returns a Q_NULLPTR if it is not found. + \note caller is responsible for ownership +*/ +// Note: caller is responsible for ownership QAbstractPhysicalDevice *QInputAspect::createPhysicalDevice(const QString &name) { Q_D(QInputAspect); 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 db48fd059..d7f802727 100644 --- a/src/input/frontend/qinputdeviceintegration.cpp +++ b/src/input/frontend/qinputdeviceintegration.cpp @@ -52,22 +52,40 @@ QInputDeviceIntegrationPrivate::QInputDeviceIntegrationPrivate() { } +/*! + \class Qt3DInput::QInputDeviceIntegration + \inmodule Qt3DInput + \since 5.5 + \brief Abstract base class used to define new input methods such as game controllers + +*/ + +/*! + Create a new QInputDeviceIntegration with parent /a parent + */ QInputDeviceIntegration::QInputDeviceIntegration(QObject *parent) : QObject(*new QInputDeviceIntegrationPrivate, parent) { } +/*! \internal */ QInputDeviceIntegration::QInputDeviceIntegration(QInputDeviceIntegrationPrivate &dd, QObject *parent) : QObject(dd, parent) { } +/*! + Register a corresponding backend class for this front end implementation + */ void QInputDeviceIntegration::registerBackendType(const QMetaObject &metaObject, const Qt3DCore::QBackendNodeMapperPtr &functor) { Q_D(QInputDeviceIntegration); d->m_aspect->registerBackendType(metaObject, functor); } +/*! + Called by the InputAspect object after the Integration has been created + */ void QInputDeviceIntegration::initialize(QInputAspect *aspect) { Q_D(QInputDeviceIntegration); @@ -75,6 +93,10 @@ void QInputDeviceIntegration::initialize(QInputAspect *aspect) onInitialize(); } +/*! + * \brief QInputDeviceIntegration::inputAspect + * \return the Input Aspect associated with the InputDeviceIntegration + */ QInputAspect *QInputDeviceIntegration::inputAspect() const { Q_D(const QInputDeviceIntegration); @@ -83,4 +105,24 @@ QInputAspect *QInputDeviceIntegration::inputAspect() const } // namespace Qt3DInput +/*! + \fn QInputDeviceIntegration::createPhysicalDevice(const QString &name) + + Create the Physical device identified by \a name. + + If not recognized return Q_NULLPTR +*/ + +/*! + \fn QInputDeviceIntegration::physicalDevices() const + + \return the list of node ids for physical devices associated with this QInputDeviceIntegration. +*/ + +/*! + \fn QInputDeviceIntegration::physicalDevice(Qt3DCore::QNodeId id) const + + \return the QAbstractPhysicalDevice identified by the given id if it is related to this QInputDeviceIntegration. +*/ + QT_END_NAMESPACE diff --git a/src/input/frontend/qinputsequence.cpp b/src/input/frontend/qinputsequence.cpp index 673b93a08..99eff289b 100644 --- a/src/input/frontend/qinputsequence.cpp +++ b/src/input/frontend/qinputsequence.cpp @@ -124,7 +124,7 @@ QInputSequence::~QInputSequence() This signal is emitted when the timeout of the input sequence is changed. - The corresponding handeler is \c onTimeoutChanged + The corresponding handler is \c onTimeoutChanged */ /*! @@ -148,7 +148,7 @@ int QInputSequence::timeout() const This signal is emitted when the buttonInterval of the input sequence is changed. - The corresponding handeler is \c onButtonIntervalChanged + The corresponding handler is \c onButtonIntervalChanged */ /*! diff --git a/src/input/frontend/qinputsettings.cpp b/src/input/frontend/qinputsettings.cpp index 14e3556aa..08e3ce300 100644 --- a/src/input/frontend/qinputsettings.cpp +++ b/src/input/frontend/qinputsettings.cpp @@ -48,10 +48,10 @@ namespace Qt3DInput { /*! \class Qt3DInput::QInputSettings \inmodule Qt3DInput - \inherits Qt3DCore::QComponent - \brief A QInputSettings class. + \inherits Qt3DCore::QComponant + \brief QInputSettings stores settings for the specified eventSource. + \since 5.7 - \TODO */ /*! @@ -60,14 +60,11 @@ namespace Qt3DInput { \inherits Component3D \instantiates Qt3DInput::QInputSettings \brief QML frontend for the Qt3DInput::QInputSettings C++ class. + + Stores settings the specified eventSource \since 5.7 - \TODO */ -/*! - \qmlproperty Object Qt3D.Input::InputSettings::eventSource - */ - QInputSettingsPrivate::QInputSettingsPrivate() : Qt3DCore::QComponentPrivate() , m_eventSource(nullptr) @@ -92,12 +89,39 @@ QInputSettings::~QInputSettings() Holds the source for the QInputSettings. */ +/*! + \fn QInputSettings::eventSourceChanged(QObject *) + + This signal is emitted when the even source associated with the input setting is changed. +*/ + +/*! + \qmlproperty QObject Qt3D.Input::InputSettings::eventSource + + The current event source of the InputSettings object +*/ + +/*! + \qmlsignal Qt3D.Input::InputSettings::ventSourceChanged(QObject *) + + This signal is emitted when the even source associated with the input setting is changed. + + The corresponding handler is \c onEventSourceChanged +*/ + +/*! + * \brief QInputSettings::eventSource + * \return the current event source of the QInputSettings instance. + */ QObject *QInputSettings::eventSource() const { Q_D(const QInputSettings); return d->m_eventSource; } +/*! + Set the current event source of the QInputSettings instance to \a eventSource. + */ void QInputSettings::setEventSource(QObject *eventSource) { Q_D(QInputSettings); 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 ae022af93..2d9226c4e 100644 --- a/src/input/frontend/qkeyevent.cpp +++ b/src/input/frontend/qkeyevent.cpp @@ -50,6 +50,7 @@ namespace Qt3DInput { \inmodule Qt3DInput \brief QKeyEvent event type send by KeyBoardHandler. \since 5.5 + \brief Contains parameters that describe a key event */ /*! @@ -58,11 +59,19 @@ namespace Qt3DInput { \instantiates Qt3DInput::QKeyEvent \brief QML frontend for QKeyEvent C++ class. \since 5.5 + \brief Contains parameters that describe a key event The KeyEvent QML type cannot be directly created. Objects of this type 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) @@ -129,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. @@ -157,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); |