diff options
Diffstat (limited to 'src/yuzu/configuration/configure_touch_widget.h')
| -rw-r--r-- | src/yuzu/configuration/configure_touch_widget.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/yuzu/configuration/configure_touch_widget.h b/src/yuzu/configuration/configure_touch_widget.h index c85960f82..347b46583 100644 --- a/src/yuzu/configuration/configure_touch_widget.h +++ b/src/yuzu/configuration/configure_touch_widget.h | |||
| @@ -33,11 +33,11 @@ signals: | |||
| 33 | void DotMoved(int dot_id, const QPoint& pos); | 33 | void DotMoved(int dot_id, const QPoint& pos); |
| 34 | 34 | ||
| 35 | protected: | 35 | protected: |
| 36 | virtual void resizeEvent(QResizeEvent*) override; | 36 | void resizeEvent(QResizeEvent*) override; |
| 37 | virtual void mouseMoveEvent(QMouseEvent*) override; | 37 | void mouseMoveEvent(QMouseEvent*) override; |
| 38 | virtual void leaveEvent(QEvent*) override; | 38 | void leaveEvent(QEvent*) override; |
| 39 | virtual void mousePressEvent(QMouseEvent*) override; | 39 | void mousePressEvent(QMouseEvent*) override; |
| 40 | virtual bool eventFilter(QObject*, QEvent*) override; | 40 | bool eventFilter(QObject*, QEvent*) override; |
| 41 | 41 | ||
| 42 | private: | 42 | private: |
| 43 | std::optional<QPoint> MapToDeviceCoords(int screen_x, int screen_y) const; | 43 | std::optional<QPoint> MapToDeviceCoords(int screen_x, int screen_y) const; |
| @@ -53,9 +53,10 @@ private: | |||
| 53 | static constexpr char PropX[] = "device_x"; | 53 | static constexpr char PropX[] = "device_x"; |
| 54 | static constexpr char PropY[] = "device_y"; | 54 | static constexpr char PropY[] = "device_y"; |
| 55 | 55 | ||
| 56 | struct { | 56 | struct DragState { |
| 57 | bool active = false; | 57 | bool active = false; |
| 58 | QPointer<QLabel> dot; | 58 | QPointer<QLabel> dot; |
| 59 | QPoint start_pos; | 59 | QPoint start_pos; |
| 60 | } drag_state; | 60 | }; |
| 61 | DragState drag_state; | ||
| 61 | }; | 62 | }; |