QPickEvent Class
(Qt3DRender::QPickEvent)The QPickEvent class holds information when an object is picked 更多...
头文件: | #include <QPickEvent> |
qmake: | QT += 3drender |
开始支持版本: | Qt 5.7 |
Instantiated By: | PickEvent |
基类: | QObject |
派生类: |
公有类型
enum | Buttons { LeftButton, RightButton, MiddleButton, BackButton, NoButton } |
enum | Modifiers { NoModifier, ShiftModifier, ControlModifier, AltModifier, MetaModifier, KeypadModifier } |
属性
|
- 1 个属性继承自 QObject
公有函数
QPickEvent() | |
QPickEvent(const QPointF &position, const QVector3D &intersection, const QVector3D &localIntersection, float distance) | |
QPickEvent(const QPointF &position, const QVector3D &worldIntersection, const QVector3D &localIntersection, float distance, Buttons button, int buttons, int modifiers) | |
Buttons | button() const |
int | buttons() const |
float | distance() const |
bool | isAccepted() const |
QVector3D | localIntersection() const |
int | modifiers() const |
QPointF | position() const |
QVector3D | worldIntersection() const |
- 32 个公有函数继承自 QObject
公有槽函数
void | setAccepted(bool accepted) |
- 1 个公有槽函数继承自 QObject
信号
void | acceptedChanged(bool accepted) |
- 2 个信号继承自 QObject
其他继承的成员
详细描述
The QPickEvent class holds information when an object is picked
This is received as a parameter in most of the QObjectPicker component signals when picking succeeds.
参见 QPickingSettings, QPickTriangleEvent, and QObjectPicker.
成员类型
enum QPickEvent::Buttons
Constant | Value |
---|---|
Qt3DRender::QPickEvent::LeftButton | Qt::LeftButton |
Qt3DRender::QPickEvent::RightButton | Qt::RightButton |
Qt3DRender::QPickEvent::MiddleButton | Qt::MiddleButton |
Qt3DRender::QPickEvent::BackButton | Qt::BackButton |
Qt3DRender::QPickEvent::NoButton | Qt::NoButton |
enum QPickEvent::Modifiers
Constant | Value |
---|---|
Qt3DRender::QPickEvent::NoModifier | Qt::NoModifier |
Qt3DRender::QPickEvent::ShiftModifier | Qt::ShiftModifier |
Qt3DRender::QPickEvent::ControlModifier | Qt::ControlModifier |
Qt3DRender::QPickEvent::AltModifier | Qt::AltModifier |
Qt3DRender::QPickEvent::MetaModifier | Qt::MetaModifier |
Qt3DRender::QPickEvent::KeypadModifier | Qt::KeypadModifier |
属性
accepted : bool
Specifies if event has been accepted
访问函数:
bool | isAccepted() const |
void | setAccepted(bool accepted) |
Notifier signal:
void | acceptedChanged(bool accepted) |
button : const Qt3DRender::QPickEvent::Buttons
Specifies mouse button that caused the event
访问函数:
Buttons | button() const |
buttons : const int
Specifies state of the mouse buttons for the event
访问函数:
int | buttons() const |
distance : const float
Specifies the distance of the hit to the camera
访问函数:
float | distance() const |
localIntersection : const QVector3D
Specifies the coordinates of the hit in the local coordinate system of the picked entity
访问函数:
QVector3D | localIntersection() const |
modifiers : const int
Specifies state of the mouse buttons for the event
访问函数:
int | modifiers() const |
position : const QPointF
Specifies the mouse position with respect to the render area (window or quick item)
访问函数:
QPointF | position() const |
worldIntersection : const QVector3D
Specifies the coordinates of the hit in world coordinate system
访问函数:
QVector3D | worldIntersection() const |
成员函数
QPickEvent::QPickEvent()
Constructs a new QPickEvent.
QPickEvent::QPickEvent(const QPointF &position, const QVector3D &intersection, const QVector3D &localIntersection, float distance)
Constructs a new QPickEvent with the given parameters: position, intersection, localIntersection and distance
QPickEvent::QPickEvent(const QPointF &position, const QVector3D &worldIntersection, const QVector3D &localIntersection, float distance, Buttons button, int buttons, int modifiers)
Constructs a new QPickEvent with the given parameters: position, worldIntersection, localIntersection, distance, button, buttons and modifiers
Buttons QPickEvent::button() const
QPickEvent::button Returns mouse button that caused the event
Note: Getter function for property button.
int QPickEvent::buttons() const
QPickEvent::buttons Returns bitfield to be used to check for mouse buttons that may be accompanying the pick event.
Note: Getter function for property buttons.
float QPickEvent::distance() const
QPickEvent::distance Returns distance from camera to pick point
Note: Getter function for property distance.
bool QPickEvent::isAccepted() const
QPickEvent::isAccepted Returns true if the event has been accepted
Note: Getter function for property accepted.
QVector3D QPickEvent::localIntersection() const
QPickEvent::localIntersection Returns coordinates of the hit in the local coordinate system of the picked entity
Note: Getter function for property localIntersection.
int QPickEvent::modifiers() const
QPickEvent::modifiers Returns bitfield to be used to check for keyboard modifiers that may be accompanying the pick event.
Note: Getter function for property modifiers.
QPointF QPickEvent::position() const
QPickEvent::position Returns mouse pointer coordinate of the pick query
Note: Getter function for property position.
[slot]
void QPickEvent::setAccepted(bool accepted)
QPickEvent::setAccepted set if the event has been accepted to accepted
Note: Setter function for property accepted.
参见 isAccepted().
QVector3D QPickEvent::worldIntersection() const
QPickEvent::worldIntersection Returns coordinates of the hit in world coordinate system
Note: Getter function for property worldIntersection.