This class describes a mouse event. More...
#include <Radiant/KeyEvent.hpp>
Public Member Functions | |
| Qt::MouseButton | button () const |
| Return the button that generated the event. More... | |
| Qt::MouseButtons | buttons () const |
| Return the button state when the event was generated. More... | |
| int | delta () const |
| Return the distance the mouse wheel is rotated, in eights of a degree. More... | |
| Nimble::Vector2f | location () const |
| Get the location of the mouse cursor at the time of the event. More... | |
| Qt::KeyboardModifiers | modifiers () const |
| Return the keyboard modifiers at the time of the event. More... | |
| MouseEvent (const QMouseEvent &event) | |
| Construct a MouseEvent. More... | |
| MouseEvent (const QWheelEvent &event) | |
| Construct a MouseEvent. More... | |
| MouseEvent (QEvent::Type type, const Nimble::Vector2f &location, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) | |
| Construct a MouseEvent. More... | |
| MouseEvent (MouseEvent &&)=default | |
| MouseEvent (const MouseEvent &e) | |
| Construct a copy of a MouseEvent. More... | |
| MouseEvent & | operator= (MouseEvent &&)=default |
| MouseEvent & | operator= (const MouseEvent &ev) |
| Construct a copy of a MouseEvent. More... | |
| void | setLocation (const Nimble::Vector2f &location) |
| Set the location of the mouse cursor at the time of the event. More... | |
| void | setType (QEvent::Type type) |
| Set the type of the event. More... | |
| QEvent::Type | type () const |
| Get the type of the event. More... | |
| virtual | ~MouseEvent () |
| Destructor. | |
This class describes a mouse event.
Mouse events are produced when the application has input focus and a mouse is either moved, or a button is pressed or relesed.
| Radiant::MouseEvent::MouseEvent | ( | const QMouseEvent & | event | ) |
Construct a MouseEvent.
| event | QMouseEvent to copy |
| Radiant::MouseEvent::MouseEvent | ( | const QWheelEvent & | event | ) |
Construct a MouseEvent.
| event | QWheelEvent to copy |
| Radiant::MouseEvent::MouseEvent | ( | QEvent::Type | type, |
| const Nimble::Vector2f & | location, | ||
| Qt::MouseButton | button, | ||
| Qt::MouseButtons | buttons, | ||
| Qt::KeyboardModifiers | modifiers | ||
| ) |
Construct a MouseEvent.
| type | must be one of QEvent::MouseButtonPress, QEvent::MouseButtonRelease, QEvent::MouseButtonDblClick, or QEvent::MouseMove |
| location | mouse cursor's location |
| button | the button that caused the event. If the event type is QEvent::MouseMove, the appropriate button for the event is Qt::NoButton |
| buttons | state of the mouse buttons |
| modifiers | state of keyboard modifiers |
| Radiant::MouseEvent::MouseEvent | ( | const MouseEvent & | e | ) |
Construct a copy of a MouseEvent.
| e | event to copy |
| Qt::MouseButton Radiant::MouseEvent::button | ( | ) | const |
Return the button that generated the event.
| Qt::MouseButtons Radiant::MouseEvent::buttons | ( | ) | const |
Return the button state when the event was generated.
| int Radiant::MouseEvent::delta | ( | ) | const |
Return the distance the mouse wheel is rotated, in eights of a degree.
| Nimble::Vector2f Radiant::MouseEvent::location | ( | ) | const |
Get the location of the mouse cursor at the time of the event.
| Qt::KeyboardModifiers Radiant::MouseEvent::modifiers | ( | ) | const |
Return the keyboard modifiers at the time of the event.
| MouseEvent& Radiant::MouseEvent::operator= | ( | const MouseEvent & | ev | ) |
| void Radiant::MouseEvent::setLocation | ( | const Nimble::Vector2f & | location | ) |
Set the location of the mouse cursor at the time of the event.
| location | location to set |
| void Radiant::MouseEvent::setType | ( | QEvent::Type | type | ) |
Set the type of the event.
| type | new event type |
| QEvent::Type Radiant::MouseEvent::type | ( | ) | const |
Get the type of the event.