diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-07-25 18:31:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 18:31:45 -0400 |
commit | 1e67d2b59f6dfd561768db3fb9a8e0c6a16ec9f2 (patch) | |
tree | 999411f1ca76390654d1034c6d0bd2c47c3f101c /src/yuzu/util | |
parent | 1bcde9dd9879fc2677695e9283f2fe1d68c935b2 (diff) | |
parent | a41baaa181f30229d3552caa69135be978c1ddb5 (diff) |
Merge pull request #8541 from FearlessTobi/multiplayer-part1
yuzu, network: Add room service and UI configuration
Diffstat (limited to 'src/yuzu/util')
-rw-r--r-- | src/yuzu/util/clickable_label.cpp | 11 | ||||
-rw-r--r-- | src/yuzu/util/clickable_label.h | 21 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/yuzu/util/clickable_label.cpp b/src/yuzu/util/clickable_label.cpp new file mode 100644 index 000000000..89d14190a --- /dev/null +++ b/src/yuzu/util/clickable_label.cpp @@ -0,0 +1,11 @@ +// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "yuzu/util/clickable_label.h" + +ClickableLabel::ClickableLabel(QWidget* parent, [[maybe_unused]] Qt::WindowFlags f) + : QLabel(parent) {} + +void ClickableLabel::mouseReleaseEvent([[maybe_unused]] QMouseEvent* event) { + emit clicked(); +} diff --git a/src/yuzu/util/clickable_label.h b/src/yuzu/util/clickable_label.h new file mode 100644 index 000000000..4fe744150 --- /dev/null +++ b/src/yuzu/util/clickable_label.h @@ -0,0 +1,21 @@ +// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include <QLabel> +#include <QWidget> + +class ClickableLabel : public QLabel { + Q_OBJECT + +public: + explicit ClickableLabel(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); + ~ClickableLabel() = default; + +signals: + void clicked(); + +protected: + void mouseReleaseEvent(QMouseEvent* event); +}; |