Edhrec tab (#5512)

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
This commit is contained in:
BruebachL 2025-01-25 23:29:27 +01:00 committed by GitHub
parent aee68f8b00
commit 4d791f4d7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 1468 additions and 28 deletions

View file

@ -0,0 +1,40 @@
#ifndef BANNER_WIDGET_H
#define BANNER_WIDGET_H
#include <QLabel>
#include <QWidget>
class BannerWidget : public QWidget
{
Q_OBJECT
public:
explicit BannerWidget(QWidget *parent,
const QString &text,
Qt::Orientation orientation = Qt::Vertical,
int transparency = 80);
void mousePressEvent(QMouseEvent *event) override;
void setBuddy(QWidget *_buddy)
{
buddy = _buddy;
}
QString getText() const
{
return bannerLabel->text();
}
protected:
void paintEvent(QPaintEvent *event) override;
private:
QLabel *bannerLabel;
Qt::Orientation gradientOrientation;
int transparency; // Transparency percentage for the gradient
QWidget *buddy;
signals:
void buddyVisibilityChanged();
private slots:
void toggleBuddyVisibility() const;
};
#endif // BANNER_WIDGET_H