1 #ifndef PAGE_LABEL_WIDGET_H 2 #define PAGE_LABEL_WIDGET_H 3 4 #include <QWidget> 5 6 class QLabel; 7 class QPropertyAnimation; 8 9 class PageLabelWidget : public QWidget 10 { 11 Q_OBJECT 12 private: 13 QLabel *textLabel; 14 QPropertyAnimation *animation; 15 16 protected: 17 void paintEvent(QPaintEvent *) override; 18 19 public: 20 PageLabelWidget(QWidget *parent); 21 22 public slots: 23 void show(); 24 void hide(); 25 void setText(const QString &text); 26 void updatePosition(); 27 }; 28 29 #endif 30