QAbstract3DInputHandler — PyQt Documentation v6.9.0 (original) (raw)

PyQt6.QtDataVisualization.QAbstract3DInputHandler

Inherits from QObject.

Inherited by Q3DInputHandler.

Description

The base class for implementations of input handlers.

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.

Enums

InputView

Predefined input views for mouse and touch based input handlers.

Member Value Description
InputViewNone 0 Mouse or touch not on a view.
InputViewOnPrimary 1 Mouse or touch input received on the primary view area. If secondary view is displayed when inputView() becomes , secondary view is closed.
InputViewOnSecondary 2 Mouse or touch input received on the secondary view area.

Methods

__init__(parent: QObject = None)

Constructs the base class. An optional parent parameter can be given and is then passed to QObject constructor.


inputPosition() → QPoint

See also

setInputPosition().


inputView() → InputView


mouseDoubleClickEvent(QMouseEvent)

Override this to handle mouse double click events. Mouse double click event is given in the event.


mouseMoveEvent(QMouseEvent, QPoint)

Override this to handle mouse move events. Mouse move event is given in the event and the mouse position in mousePos.


mousePressEvent(QMouseEvent, QPoint)

Override this to handle mouse press events. Mouse press event is given in the event and the mouse position in mousePos.


mouseReleaseEvent(QMouseEvent, QPoint)

Override this to handle mouse release events. Mouse release event is given in the event and the mouse position in mousePos.


prevDistance() → int

Returns the manhattan length between last two input positions.

See also

setPrevDistance().


previousInputPos() → QPoint

Returns the previous input position.


scene() → Q3DScene


setInputPosition(QPoint)

See also

inputPosition().


setInputView(InputView)


setPrevDistance(int)

Sets the distance (manhattan length) between last two input positions.


setPreviousInputPos(QPoint)

Sets the previous input position to the point given by position.

See also

previousInputPos().


setScene(Q3DScene)


touchEvent(QTouchEvent)

Override this to handle touch input events. Touch event is given in the event.


wheelEvent(QWheelEvent)

Override this to handle wheel events. Wheel event is given in the event.

Signals

inputViewChanged(InputView)

TODO


positionChanged(QPoint)

TODO


sceneChanged(Q3DScene)

TODO