Add mutitouch support for touch screens

This commit is contained in:
german
2021-01-02 22:04:50 -06:00
parent d8df9a16bd
commit 8495e1bd83
10 changed files with 138 additions and 86 deletions

View File

@ -11,6 +11,7 @@
#include <QImage>
#include <QThread>
#include <QTouchEvent>
#include <QWidget>
#include <QWindow>
@ -21,7 +22,6 @@
class GRenderWindow;
class GMainWindow;
class QKeyEvent;
class QTouchEvent;
class QStringList;
namespace InputCommon {
@ -191,6 +191,10 @@ private:
void TouchUpdateEvent(const QTouchEvent* event);
void TouchEndEvent();
bool TouchStart(const QTouchEvent::TouchPoint& touch_point);
bool TouchUpdate(const QTouchEvent::TouchPoint& touch_point);
bool TouchExist(std::size_t id, const QList<QTouchEvent::TouchPoint>& touch_points) const;
void OnMinimalClientAreaChangeRequest(std::pair<u32, u32> minimal_size) override;
bool InitializeOpenGL();
@ -215,6 +219,8 @@ private:
bool first_frame = false;
std::array<std::size_t, 16> touch_ids{};
protected:
void showEvent(QShowEvent* event) override;
bool eventFilter(QObject* object, QEvent* event) override;