mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
DolphinQt: JIT Widget Refresh
Fulfilling a certain six-year-old todo.
This commit is contained in:
22
Source/Core/DolphinQt/QtUtils/ClickableStatusBar.h
Normal file
22
Source/Core/DolphinQt/QtUtils/ClickableStatusBar.h
Normal file
@ -0,0 +1,22 @@
|
||||
// Copyright 2024 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QStatusBar>
|
||||
|
||||
// I wanted a QStatusBar that emits a signal when clicked. Qt only provides event overrides.
|
||||
class ClickableStatusBar final : public QStatusBar
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
signals:
|
||||
void pressed();
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent* event) override { emit pressed(); }
|
||||
|
||||
public:
|
||||
explicit ClickableStatusBar(QWidget* parent) : QStatusBar(parent) {}
|
||||
~ClickableStatusBar() override = default;
|
||||
};
|
Reference in New Issue
Block a user