QAbstract3DInputHandler Class

The base class for implementations of input handlers. More...

Header: #include <QAbstract3DInputHandler>
CMake: find_package(Qt6 REQUIRED COMPONENTS DataVisualization)
target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)
qmake: QT += datavisualization
Since: QtDataVisualization 1.0
Instantiated By: AbstractInputHandler3D
Inherited By:

Q3DInputHandler

Public Types

enum InputView { InputViewNone, InputViewOnPrimary, InputViewOnSecondary }

Properties

Public Functions

virtual ~QAbstract3DInputHandler()
QPoint inputPosition() const
InputView inputView() const
Q3DScene *scene() const
void setInputPosition()
void setInputView()
void setScene()

Signals

Protected Functions

int prevDistance() const
QPoint previousInputPos() const

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.

Member Type Documentation

enum QAbstract3DInputHandler::InputView

Predefined input views for mouse and touch based input handlers.

ConstantValueDescription
QAbstract3DInputHandler::InputViewNone0Mouse or touch not on a view.
QAbstract3DInputHandler::InputViewOnPrimary1Mouse or touch input received on the primary view area. If secondary view is displayed when inputView becomes InputViewOnPrimary, secondary view is closed.
QAbstract3DInputHandler::InputViewOnSecondary2Mouse or touch input received on the secondary view area.

Property Documentation

inputPosition : QPoint

This property holds the last input position based on the processed input events.

Access functions:

QPoint inputPosition() const
void setInputPosition()

Notifier signal:

void positionChanged()

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.

Access functions:

InputView inputView() const
void setInputView()

Notifier signal:

void inputViewChanged()

See also InputView.

scene : 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:

Q3DScene *scene() const
void setScene()

Notifier signal:

void sceneChanged()

Member Function Documentation

[virtual] QAbstract3DInputHandler::~QAbstract3DInputHandler()

Destroys the base class.

[protected] int QAbstract3DInputHandler::prevDistance() const

Returns the manhattan length between last two input positions.

[protected] QPoint QAbstract3DInputHandler::previousInputPos() const

Returns the previous input position.