Guitar
ProgressTextLabel.h
Go to the documentation of this file.
1 #ifndef PROGRESSTEXTLABEL_H
2 #define PROGRESSTEXTLABEL_H
3 
4 #include <QLabel>
5 #include <QTimer>
6 
7 class ProgressTextLabel : public QLabel {
8  Q_OBJECT
9 private:
10  float progress_ = 0;
11  QTimer timer_;
12  int animation_ = 0;
13  bool bar_visible = true;
14  bool msg_visible = true;
15 protected:
16  void paintEvent(QPaintEvent *event);
17 public:
18  ProgressTextLabel(QWidget *parent = nullptr);
19  void setElementVisible(bool bar, bool msg);
20  void setProgress(float progress);
21 };
22 
23 #endif // PROGRESSTEXTLABEL_H
Definition: ProgressTextLabel.h:7
bool bar_visible
Definition: ProgressTextLabel.h:13
ProgressTextLabel(QWidget *parent=nullptr)
Definition: ProgressTextLabel.cpp:6
void paintEvent(QPaintEvent *event)
Definition: ProgressTextLabel.cpp:28
bool msg_visible
Definition: ProgressTextLabel.h:14
int animation_
Definition: ProgressTextLabel.h:12
void setProgress(float progress)
Definition: ProgressTextLabel.cpp:23
void setElementVisible(bool bar, bool msg)
Definition: ProgressTextLabel.cpp:17
QTimer timer_
Definition: ProgressTextLabel.h:11
float progress_
Definition: ProgressTextLabel.h:10