QAbstract3DInputHandler Class▲
-
Header: QAbstract3DInputHandler
-
Since: QtDataVisualization 1.0
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS DataVisualization)
target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)
-
qmake: QT += datavisualization
-
Inherited By: Q3DInputHandler
-
Instantiated By: qml-qtdatavisualization-abstractinputhandler3d.xml
-
Inherits: QObject
-
Inherited By: Q3DInputHandler
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.
Constant |
Value |
Description |
---|---|---|
QAbstract3DInputHandler::InputViewNone |
0 |
Mouse or touch not on a view. |
QAbstract3DInputHandler::InputViewOnPrimary |
1 |
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 |
2 |
Mouse 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:
-
inputPosition() const
-
void setInputPosition(const &position)
Notifier signal:
-
void positionChanged(const &position)
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() const
-
void setInputView( inputView)
Notifier signal:
-
void inputViewChanged( view)
See Also▲
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:
-
*scene() const
-
void setScene( *scene)
Notifier signal:
-
void sceneChanged( *scene)
Member Function Documentation▲
[explicit protected] QAbstract3DInputHandler::QAbstract3DInputHandler(QObject *parent = nullptr)▲
Constructs the base class. An optional parent parameter can be given and is then passed to QObject constructor.
[virtual] QAbstract3DInputHandler::~QAbstract3DInputHandler()▲
Destroys the base class.
[virtual] void QAbstract3DInputHandler::mouseDoubleClickEvent(QMouseEvent *event)▲
Override this to handle mouse double click events. Mouse double click event is given in the event.
[virtual] void QAbstract3DInputHandler::mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos)▲
Override this to handle mouse move events. Mouse move event is given in the event and the mouse position in mousePos.
[virtual] void QAbstract3DInputHandler::mousePressEvent(QMouseEvent *event, const QPoint &mousePos)▲
Override this to handle mouse press events. Mouse press event is given in the event and the mouse position in mousePos.
[virtual] void QAbstract3DInputHandler::mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos)▲
Override this to handle mouse release events. Mouse release event is given in the event and the mouse position in mousePos.
[protected] int QAbstract3DInputHandler::prevDistance() const▲
[protected] QPoint QAbstract3DInputHandler::previousInputPos() const▲
[protected] void QAbstract3DInputHandler::setPrevDistance(int distance)▲
Sets the distance (manhattan length) between last two input positions.
See Also▲
See also prevDistance()
[protected] void QAbstract3DInputHandler::setPreviousInputPos(const QPoint &position)▲
Sets the previous input position to the point given by position.
See Also▲
See also previousInputPos()
[virtual] void QAbstract3DInputHandler::touchEvent(QTouchEvent *event)▲
Override this to handle touch input events. Touch event is given in the event.
[virtual] void QAbstract3DInputHandler::wheelEvent(QWheelEvent *event)▲
Override this to handle wheel events. Wheel event is given in the event.