mirror of
https://github.com/dolphin-emu/dolphin
synced 2024-11-24 22:34:13 -05:00
9afd09598c
Fulfilling a certain six-year-old todo.
23 lines
522 B
C++
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;
|
|
};
|