QWheelEvent Class

(Qt3DInput::QWheelEvent)

The QWheelEvent class contains parameters that describe a mouse wheel event. 更多...

头文件: #include <Qt3DInput/QWheelEvent>
qmake: QT += 3dinput
开始支持版本: Qt 5.5
Instantiated By: WheelEvent
基类: QObject

公有类型

enum Buttons { LeftButton, RightButton, MiddleButton, BackButton, NoButton }
enum Modifiers { NoModifier, ShiftModifier, ControlModifier, AltModifier, MetaModifier, KeypadModifier }

属性

  • modifiers : const Qt3DInput::QWheelEvent::Modifiers
  • x : const int
  • y : const int

公有函数

QWheelEvent(const QWheelEvent &e)
~QWheelEvent()
QPoint angleDelta() const
int buttons() const
bool isAccepted() const
Modifiers modifiers() const
void setAccepted(bool accepted)
QEvent::Type type() const
int x() const
int y() const
  • 32 个公有函数继承自 QObject
typedef QWheelEventPtr

其他继承的成员

  • 1 个公有槽函数继承自 QObject
  • 2 个信号继承自 QObject
  • 1 个公有变量继承自 QObject
  • 10 个静态公有成员继承自 QObject
  • 9 个受保护的函数继承自 QObject
  • 2 个受保护的变量继承自 QObject

详细描述

The QWheelEvent class contains parameters that describe a mouse wheel event.

Mouse wheel events occur when the mouse is rotated.

参见 QKeyEvent, QMouseEvent, and QMouseHandler.

成员类型

enum QWheelEvent::Buttons

ConstantValue
Qt3DInput::QWheelEvent::LeftButtonQt::LeftButton
Qt3DInput::QWheelEvent::RightButtonQt::RightButton
Qt3DInput::QWheelEvent::MiddleButtonQt::MiddleButton
Qt3DInput::QWheelEvent::BackButtonQt::BackButton
Qt3DInput::QWheelEvent::NoButtonQt::NoButton

enum QWheelEvent::Modifiers

ConstantValue
Qt3DInput::QWheelEvent::NoModifierQt::NoModifier
Qt3DInput::QWheelEvent::ShiftModifierQt::ShiftModifier
Qt3DInput::QWheelEvent::ControlModifierQt::ControlModifier
Qt3DInput::QWheelEvent::AltModifierQt::AltModifier
Qt3DInput::QWheelEvent::MetaModifierQt::MetaModifier
Qt3DInput::QWheelEvent::KeypadModifierQt::KeypadModifier

属性

accepted : bool

Specifies if the mouse wheel event has been accepted

访问函数:

bool isAccepted() const
void setAccepted(bool accepted)

angleDelta : const QPoint

Specifies The change wheel angle of the mouse wheel event

访问函数:

QPoint angleDelta() const

buttons : const int

Specifies the button if present in the mouse wheel event

访问函数:

int buttons() const

modifiers : const Qt3DInput::QWheelEvent::Modifiers

Specifies if any modifiers were applied to the mouse wheel event

访问函数:

Modifiers modifiers() const

x : const int

Specifies The X coordinate of the mouse wheel event

访问函数:

int x() const

y : const int

Specifies The Y coordinate of the mouse wheel event

访问函数:

int y() const

成员函数

QWheelEvent::QWheelEvent(const QWheelEvent &e)

Constructs a new QWheelEvent instance from the QWheelEvent e.

QWheelEvent::~QWheelEvent()

Destroys the instance of QWheelEvent.

QPoint QWheelEvent::angleDelta() const

Returns the distance that the wheel is rotated, in eighths of a degree. A positive value indicates that the wheel was rotated forward (away from the user), a negative value indicates the wheel was rotated backward (toward the user).

Note: Getter function for property angleDelta.

int QWheelEvent::buttons() const

Returns a bitfield to be used to check for mouse buttons that may be accompanying the wheel event.

Note: Getter function for property buttons.

bool QWheelEvent::isAccepted() const

Returns whether the event was accepted.

Note: Getter function for property accepted.

Modifiers QWheelEvent::modifiers() const

Returns the keyboard modifiers that may be accompanying the wheel event.

Note: Getter function for property modifiers.

void QWheelEvent::setAccepted(bool accepted)

Sets the event as accepted if accepted is true.

Note: When an event is accepted, it will prevent further propagation to other listeners.

Note: Setter function for property accepted.

参见 isAccepted().

QEvent::Type QWheelEvent::type() const

Returns the QEvent::Type of the event.

int QWheelEvent::x() const

Returns the x position of the mouse event.

Note: Getter function for property x.

int QWheelEvent::y() const

Returns the x position of the mouse event.

Note: Getter function for property y.

相关非成员

typedef Qt3DInput::QWheelEventPtr

A shared pointer for QWheelEvent.