21 NEXT_WAGON_BUTTON = 3,
22 PREV_WAGON_BUTTON = 4,
43 void moveInput(
int type, qreal x, qreal y);
48 void touchInput(qreal oldx, qreal oldy, qreal x, qreal y);
EventHandler(Game *game=nullptr)
Definition: eventhandler.cpp:21
void switchToPreviousWagon()
Definition: eventhandler.cpp:161
void mouseMoveEvent(qreal x, qreal y)
Definition: eventhandler.cpp:124
The Game class is the main entry point. It subclasses QQuickItem and handles all communication betwee...
Definition: game.h:36
The EventHandler class receives events (touch, key, mouse, gyroscope, etc.) and triggers actions...
Definition: eventhandler.h:14
void keyPressEvent(Qt::Key key)
Definition: eventhandler.cpp:72
void gyroMoveEvent(qreal x, qreal y)
Definition: eventhandler.cpp:146
void touchFire()
Definition: eventhandler.cpp:166
void keyInput(Qt::Key key)
Handles a key event.
Definition: eventhandler.cpp:43
Definition: eventhandler.cpp:18
void touchInput(qreal oldx, qreal oldy, qreal x, qreal y)
Handles touch input.
Definition: eventhandler.cpp:60
Game * m_game
Definition: eventhandler.h:60
void moveInput(int type, qreal x, qreal y)
Handles mouse and gyroscope movements.
Definition: eventhandler.cpp:48
void switchToNextWagon()
Definition: eventhandler.cpp:156
void buttonInput(int type)
Handles a click on a QML UI button.
Definition: eventhandler.cpp:27