diff options
author | Zephyron <zephyron@citron-emu.org> | 2024-12-31 16:19:25 +1000 |
---|---|---|
committer | Zephyron <zephyron@citron-emu.org> | 2024-12-31 16:19:25 +1000 |
commit | 9427e27e24a7135880ee2881c3c44988e174b41a (patch) | |
tree | 83f0062a35be144f6b162eaa823c5b3c7620146e /src/yuzu/configuration/configure_touch_widget.h | |
parent | b35ae725d20960411e8588b11c12a2d55f86c9d0 (diff) |
chore: update project branding to citron
Diffstat (limited to 'src/yuzu/configuration/configure_touch_widget.h')
-rw-r--r-- | src/yuzu/configuration/configure_touch_widget.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/yuzu/configuration/configure_touch_widget.h b/src/yuzu/configuration/configure_touch_widget.h deleted file mode 100644 index 49f533afe..000000000 --- a/src/yuzu/configuration/configure_touch_widget.h +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-FileCopyrightText: 2020 Citra Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include <optional> -#include <utility> -#include <vector> -#include <QFrame> -#include <QPointer> - -class QLabel; - -// Widget for representing touchscreen coordinates -class TouchScreenPreview : public QFrame { - Q_OBJECT - Q_PROPERTY(QColor dotHighlightColor MEMBER dot_highlight_color) - -public: - explicit TouchScreenPreview(QWidget* parent); - ~TouchScreenPreview() override; - - void SetCoordLabel(QLabel*); - int AddDot(int device_x, int device_y); - void RemoveDot(int id); - void HighlightDot(int id, bool active = true) const; - void MoveDot(int id, int device_x, int device_y) const; - -signals: - void DotAdded(const QPoint& pos); - void DotSelected(int dot_id); - void DotMoved(int dot_id, const QPoint& pos); - -protected: - void resizeEvent(QResizeEvent*) override; - void mouseMoveEvent(QMouseEvent*) override; - void leaveEvent(QEvent*) override; - void mousePressEvent(QMouseEvent*) override; - bool eventFilter(QObject*, QEvent*) override; - -private: - std::optional<QPoint> MapToDeviceCoords(int screen_x, int screen_y) const; - void PositionDot(QLabel* dot, int device_x = -1, int device_y = -1) const; - - bool ignore_resize = false; - QPointer<QLabel> coord_label; - - std::vector<std::pair<int, QLabel*>> dots; - int max_dot_id = 0; - QColor dot_highlight_color; - static constexpr char PropId[] = "dot_id"; - static constexpr char PropX[] = "device_x"; - static constexpr char PropY[] = "device_y"; - - struct DragState { - bool active = false; - QPointer<QLabel> dot; - QPoint start_pos; - }; - DragState drag_state; -}; |