Q3DInputHandler 类

基于滚轮鼠标的基本输入处理程序。 更多...

头: #include <Q3DInputHandler>
Since: QtDataVisualization 1.0
实例化: InputHandler3D
继承: QAbstract3DInputHandler
继承者: QTouch3DInputHandler

特性

公共函数

Q3DInputHandler (QObject * parent = nullptr)
virtual ~Q3DInputHandler ()
bool isRotationEnabled () const
bool isSelectionEnabled () const
bool isZoomAtTargetEnabled () const
bool isZoomEnabled () const
void setRotationEnabled (bool enable )
void setSelectionEnabled (bool enable )
void setZoomAtTargetEnabled (bool enable )
void setZoomEnabled (bool enable )

重实现公共函数

virtual void mouseMoveEvent (QMouseEvent * event , const QPoint & mousePos )
virtual void mousePressEvent (QMouseEvent * event , const QPoint & mousePos )
virtual void mouseReleaseEvent (QMouseEvent * event , const QPoint & mousePos )
virtual void wheelEvent (QWheelEvent * event )

信号

void rotationEnabledChanged (bool enable )
void selectionEnabledChanged (bool enable )
void zoomAtTargetEnabledChanged (bool enable )
void zoomEnabledChanged (bool enable )

静态公共成员

const QMetaObject staticMetaObject

额外继承成员

详细描述

基于滚轮鼠标的基本输入处理程序。

Q3DInputHandler is the basic input handler for wheel mouse type of input devices.

Default input handler has the following functionalty:

Mouse action 动作
Drag with right button pressed Rotate graph within limits set for Q3DCamera .
Left click Select item under cursor or remove selection if none. May open the secondary view depending on the 选定模式 .
Mouse wheel Zoom in/out within the allowable zoom range set for Q3DCamera .
Left click on the primary view when the secondary view is visible

Closes the secondary view.

注意: Secondary view is available only for Q3DBars and Q3DSurface 图形。

Rotation, zoom, and selection can each be individually disabled using corresponding properties of this class.

特性文档编制

rotationEnabled : bool

This property holds whether this input handler allows graph rotation.

默认为 true .

该特性在 QtDataVisualization 1.2 引入。

访问函数:

bool isRotationEnabled () const
void setRotationEnabled (bool enable )

通知程序信号:

void rotationEnabledChanged (bool enable )

selectionEnabled : bool

This property holds whether this input handler allows selection from the graph.

默认为 true .

该特性在 QtDataVisualization 1.2 引入。

访问函数:

bool isSelectionEnabled () const
void setSelectionEnabled (bool enable )

通知程序信号:

void selectionEnabledChanged (bool enable )

zoomAtTargetEnabled : bool

This property holds whether zooming should change the camera target so that the zoomed point of the graph stays at the same location after the zoom.

默认为 true .

该特性在 QtDataVisualization 1.2 引入。

访问函数:

bool isZoomAtTargetEnabled () const
void setZoomAtTargetEnabled (bool enable )

通知程序信号:

void zoomAtTargetEnabledChanged (bool enable )

zoomEnabled : bool

This property holds whether this input handler allows graph zooming.

默认为 true .

该特性在 QtDataVisualization 1.2 引入。

访问函数:

bool isZoomEnabled () const
void setZoomEnabled (bool enable )

通知程序信号:

void zoomEnabledChanged (bool enable )

成员函数文档编制

Q3DInputHandler:: Q3DInputHandler ( QObject * parent = nullptr)

Constructs the basic mouse input handler. An optional parent 参数可以给出,然后会被传递给 QObject 构造函数。

[虚拟] Q3DInputHandler:: ~Q3DInputHandler ()

Destroys the input handler.

[虚拟] void Q3DInputHandler:: mouseMoveEvent ( QMouseEvent * event , const QPoint & mousePos )

重实现自 QAbstract3DInputHandler::mouseMoveEvent ().

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

[虚拟] void Q3DInputHandler:: mousePressEvent ( QMouseEvent * event , const QPoint & mousePos )

重实现自 QAbstract3DInputHandler::mousePressEvent ().

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

[虚拟] void Q3DInputHandler:: mouseReleaseEvent ( QMouseEvent * event , const QPoint & mousePos )

重实现自 QAbstract3DInputHandler::mouseReleaseEvent ().

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

[虚拟] void Q3DInputHandler:: wheelEvent ( QWheelEvent * event )

重实现自 QAbstract3DInputHandler::wheelEvent ().

Override this to change handling of wheel events. The wheel event is given in the event .