dolphin/Source/Core/DolphinQt/QtUtils/ClickableStatusBar.h
mitaclaw 9afd09598c DolphinQt: JIT Widget Refresh
Fulfilling a certain six-year-old todo.
2024-10-19 02:30:44 -07:00

23 lines
522 B
C++

// 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;
};