QAbstract3DInputHandler#
The base class for implementations of input handlers. More…
Inherited by: Q3DInputHandler, QTouch3DInputHandler
Synopsis#
Properties#
inputPosition
- Last input position based on the processed input eventsinputView
- Current enumerated input view based on the view of the processed input eventsscene
- 3D scene this abstract input handler is controlling
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)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
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.
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.QtDataVisualization.QAbstract3DInputHandler.inputPosition: PySide6.QtCore.QPoint#
This property holds The last input position based on the processed input events..
- Access functions:
setInputPosition
(position)Signal
positionChanged
(position)
- property PᅟySide6.QtDataVisualization.QAbstract3DInputHandler.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
- Access functions:
inputView
()setInputView
(inputView)Signal
inputViewChanged
(view)
- property PᅟySide6.QtDataVisualization.QAbstract3DInputHandler.scene: PySide6.QtDataVisualization.Q3DScene#
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.
- Access functions:
scene
()setScene
(scene)Signal
sceneChanged
(scene)
- 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 InputViewOnPrimary, secondary view is closed.QAbstract3DInputHandler.InputViewOnSecondary
Mouse or touch input received on the secondary view area.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.inputPosition()#
- Return type:
See also
Getter of property inputPosition
.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.inputView()#
- Return type:
See also
Getter of property inputView
.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.inputViewChanged(view)#
- Parameters:
view –
InputView
Notification signal of property 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
Notification signal of property inputPosition
.
- 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:
See also
Getter of property scene
.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.sceneChanged(scene)#
- Parameters:
Notification signal of property scene
.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.setInputPosition(position)#
- Parameters:
position –
PySide6.QtCore.QPoint
See also
Setter of property inputPosition
.
- PySide6.QtDataVisualization.QAbstract3DInputHandler.setInputView(inputView)#
- Parameters:
inputView –
InputView
See also
Setter of property 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:
See also
Setter of property 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
.