2021-03-05 02:35:15 +03:00
|
|
|
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2017-05-16 21:46:45 +03:00
|
|
|
#pragma once
|
2017-04-06 02:06:42 +03:00
|
|
|
|
|
|
|
#include <QEvent>
|
|
|
|
#include <QWidget>
|
|
|
|
|
2020-01-31 08:12:02 +03:00
|
|
|
class QPainter;
|
|
|
|
|
2017-04-06 02:06:42 +03:00
|
|
|
class OverlayWidget : public QWidget
|
|
|
|
{
|
2017-09-10 12:59:21 +03:00
|
|
|
Q_OBJECT
|
2017-04-06 02:06:42 +03:00
|
|
|
|
|
|
|
public:
|
2017-09-10 12:59:21 +03:00
|
|
|
explicit OverlayWidget(QWidget *parent = nullptr);
|
2017-04-06 02:06:42 +03:00
|
|
|
|
|
|
|
protected:
|
2017-09-10 12:59:21 +03:00
|
|
|
bool event(QEvent *event) override;
|
|
|
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
2017-04-06 02:06:42 +03:00
|
|
|
|
2017-09-10 12:59:21 +03:00
|
|
|
QRect overlayGeometry() const;
|
2017-11-16 17:33:52 +03:00
|
|
|
void paintEvent(QPaintEvent *event) override;
|
2017-04-06 02:06:42 +03:00
|
|
|
};
|