22 lines
881 B
C++
22 lines
881 B
C++
#pragma once
|
|
#include "render_2D/event/Event.h"
|
|
#include <QEvent>
|
|
#include <QKeyEvent>
|
|
#include <QMouseEvent>
|
|
#include <QResizeEvent>
|
|
#include <QWheelEvent>
|
|
namespace renderive {
|
|
struct Qt_Event_Adapter {
|
|
static Pointer_Event to_pointer_event(const QMouseEvent* qt_event, Event_Type type);
|
|
static Wheel_Event to_wheel_event(const QWheelEvent* qt_event);
|
|
static Key_Event to_key_event(const QKeyEvent* qt_event, Event_Type type);
|
|
static Resize_Event to_resize_event(const QResizeEvent* qt_event);
|
|
static PointF to_pointf(const QPointF& p);
|
|
static Size to_size(const QSize& s);
|
|
static Mouse_Button to_mouse_button(Qt::MouseButton button);
|
|
static std::uint8_t to_mouse_buttons(Qt::MouseButtons buttons);
|
|
static Keyboard_Modifier to_keyboard_modifiers(Qt::KeyboardModifiers modifiers);
|
|
static Key to_key(int qt_key);
|
|
};
|
|
} // namespace renderive
|