mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 10:22:58 -05:00
This reduces boilerplate code and remove the ThemeManager dependency at Thamable subclasses level.
35 lines
618 B
C++
35 lines
618 B
C++
#ifndef PAGE_LABEL_WIDGET_H
|
|
#define PAGE_LABEL_WIDGET_H
|
|
|
|
#include <QWidget>
|
|
|
|
#include "themable.h"
|
|
|
|
class QLabel;
|
|
class QPropertyAnimation;
|
|
|
|
class PageLabelWidget : public QWidget, protected Themable
|
|
{
|
|
Q_OBJECT
|
|
private:
|
|
QLabel *textLabel;
|
|
QPropertyAnimation *animation;
|
|
QColor infoBackgroundColor;
|
|
int fontSizePx = 0;
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *) override;
|
|
void applyTheme(const Theme &theme) override;
|
|
|
|
public:
|
|
PageLabelWidget(QWidget *parent);
|
|
|
|
public slots:
|
|
void show();
|
|
void hide();
|
|
void setText(const QString &text);
|
|
void updatePosition();
|
|
};
|
|
|
|
#endif
|