nCine::Backends::Qt5InputManager class

Class for parsing and dispatching Qt5 input events.

Base classes

class nCine::IInputManager
Interface for parsing and dispatching input events.

Constructors, destructors, conversion operators

Qt5InputManager(Qt5Widget& widget)
The constructor takes care of opening available joysticks.
~Qt5InputManager()
The destructor releases every opened joystick.

Public functions

auto shouldQuitOnRequest() -> bool
auto event(QEvent* event) -> bool
void keyPressEvent(QKeyEvent* event)
void keyReleaseEvent(QKeyEvent* event)
void mousePressEvent(QMouseEvent* event)
void mouseReleaseEvent(QMouseEvent* event)
void mouseMoveEvent(QMouseEvent* event)
void touchBeginEvent(QTouchEvent* event)
void touchUpdateEvent(QTouchEvent* event)
void touchEndEvent(QTouchEvent* event)
void wheelEvent(QWheelEvent* event)
auto mouseState() const -> const MouseState& override
Returns current mouse state.
auto keyboardState() const -> const KeyboardState& override
Returns current keyboard state.
auto isJoyPresent(int joyId) const -> bool override
Returns true if the specified joystick is connected.
auto joyName(int joyId) const -> const char* override
Returns the name of the specified joystick.
auto joyGuid(int joyId) const -> const JoystickGuid override
Returns the GUID of the specified joystick.
auto joyNumButtons(int joyId) const -> int override
Returns the number of available buttons for the specified joystick.
auto joyNumHats(int joyId) const -> int override
Returns the number of available hats for the specified joystick.
auto joyNumAxes(int joyId) const -> int override
Returns the number of available axes for the specified joystick.
auto joystickState(int joyId) const -> const JoystickState& override
Returns the state of the joystick.
void setCursor(Cursor cursor) override
Sets the mouse cursor mode.