QAbstract3DInputHandler¶
The base class for implementations of input handlers. More…
Inherited by: Q3DInputHandler, QTouch3DInputHandler
Synopsis¶
Functions¶
def
inputPosition
()def
inputView
()def
prevDistance
()def
previousInputPos
()def
scene
()def
setInputPosition
(position)def
setInputView
(inputView)def
setPrevDistance
(distance)def
setPreviousInputPos
(position)def
setScene
(scene)
Virtual functions¶
def
mouseDoubleClickEvent
(event)def
mouseMoveEvent
(event, mousePos)def
mousePressEvent
(event, mousePos)def
mouseReleaseEvent
(event, mousePos)def
touchEvent
(event)def
wheelEvent
(event)
Signals¶
def
inputViewChanged
(view)def
positionChanged
(position)def
sceneChanged
(scene)
Detailed Description¶
QAbstract3DInputHandler
is the base class that is subclassed by different input handling implementations that take input events and translate those to camera and light movements. Input handlers also translate raw input events to slicing and selection events in the scene.
- class PySide6.QtDataVisualization.QAbstract3DInputHandler([parent=None])¶
- Parameters
parent –
PySide6.QtCore.QObject
Constructs the base class. An optional parent
parameter can be given and is then passed to QObject
constructor.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.InputView¶
Predefined input views for mouse and touch based input handlers.
Constant
Description
QAbstract3DInputHandler.InputViewNone
Mouse or touch not on a view.
QAbstract3DInputHandler.InputViewOnPrimary
Mouse or touch input received on the primary view area. If secondary view is displayed when
inputView
becomes , secondary view is closed.QAbstract3DInputHandler.InputViewOnSecondary
Mouse or touch input received on the secondary view area.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.inputPosition()¶
- Return type
This property holds The last input position based on the processed input events..
This property holds The current enumerated input view based on the view of the processed input events..
One of the InputView
enum values.
When the view changes, the inputViewChanged
signal is emitted.
See also
InputView
- PySide6.QtDataVisualization.QAbstract3DInputHandler.inputViewChanged(view)¶
- Parameters
view –
InputView
- PySide6.QtDataVisualization.QAbstract3DInputHandler.mouseDoubleClickEvent(event)¶
- Parameters
event –
PySide6.QtGui.QMouseEvent
Override this to handle mouse double click events. Mouse double click event is given in the event
.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.mouseMoveEvent(event, mousePos)¶
- Parameters
event –
PySide6.QtGui.QMouseEvent
mousePos –
PySide6.QtCore.QPoint
Override this to handle mouse move events. Mouse move event is given in the event
and the mouse position in mousePos
.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.mousePressEvent(event, mousePos)¶
- Parameters
event –
PySide6.QtGui.QMouseEvent
mousePos –
PySide6.QtCore.QPoint
Override this to handle mouse press events. Mouse press event is given in the event
and the mouse position in mousePos
.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.mouseReleaseEvent(event, mousePos)¶
- Parameters
event –
PySide6.QtGui.QMouseEvent
mousePos –
PySide6.QtCore.QPoint
Override this to handle mouse release events. Mouse release event is given in the event
and the mouse position in mousePos
.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.positionChanged(position)¶
- Parameters
position –
PySide6.QtCore.QPoint
- PySide6.QtDataVisualization.QAbstract3DInputHandler.prevDistance()¶
- Return type
int
Returns the manhattan length between last two input positions.
See also
- PySide6.QtDataVisualization.QAbstract3DInputHandler.previousInputPos()¶
- Return type
Returns the previous input position.
See also
- PySide6.QtDataVisualization.QAbstract3DInputHandler.scene()¶
- Return type
This property holds The 3D scene this abstract input handler is controlling..
One input handler can control one scene. Setting a scene to an input handler does not transfer the ownership of the scene.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.sceneChanged(scene)¶
- Parameters
- PySide6.QtDataVisualization.QAbstract3DInputHandler.setInputPosition(position)¶
- Parameters
position –
PySide6.QtCore.QPoint
This property holds The last input position based on the processed input events..
- PySide6.QtDataVisualization.QAbstract3DInputHandler.setInputView(inputView)¶
- Parameters
inputView –
InputView
This property holds The current enumerated input view based on the view of the processed input events..
One of the InputView
enum values.
When the view changes, the inputViewChanged
signal is emitted.
See also
InputView
- PySide6.QtDataVisualization.QAbstract3DInputHandler.setPrevDistance(distance)¶
- Parameters
distance – int
Sets the distance
(manhattan length) between last two input positions.
See also
- PySide6.QtDataVisualization.QAbstract3DInputHandler.setPreviousInputPos(position)¶
- Parameters
position –
PySide6.QtCore.QPoint
Sets the previous input position to the point given by position
.
See also
- PySide6.QtDataVisualization.QAbstract3DInputHandler.setScene(scene)¶
- Parameters
This property holds The 3D scene this abstract input handler is controlling..
One input handler can control one scene. Setting a scene to an input handler does not transfer the ownership of the scene.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.touchEvent(event)¶
- Parameters
event –
PySide6.QtGui.QTouchEvent
Override this to handle touch input events. Touch event is given in the event
.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.wheelEvent(event)¶
- Parameters
event –
PySide6.QtGui.QWheelEvent
Override this to handle wheel events. Wheel event is given in the event
.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.