1 // SPDX-FileCopyrightText: 2021 Nheko Contributors 2 // 3 // SPDX-License-Identifier: GPL-3.0-or-later 4 5 #pragma once 6 7 #include <QEvent> 8 #include <QWidget> 9 10 class QPainter; 11 12 class OverlayWidget : public QWidget 13 { 14 Q_OBJECT 15 16 public: 17 explicit OverlayWidget(QWidget *parent = nullptr); 18 19 protected: 20 bool event(QEvent *event) override; 21 bool eventFilter(QObject *obj, QEvent *event) override; 22 23 QRect overlayGeometry() const; 24 void paintEvent(QPaintEvent *event) override; 25 }; 26