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_;
13  int animation_ = 0;
14  bool bar_visible = true;
15  bool msg_visible = true;
16 protected:
17  void paintEvent(QPaintEvent *event);
18 public:
19  ProgressTextLabel(QWidget *parent = nullptr);
20  void setElementVisible(bool bar, bool msg);
21  void setProgress(float progress);
22 };
23 
24 #endif // PROGRESSTEXTLABEL_H
Definition: ProgressTextLabel.h:7
bool bar_visible
Definition: ProgressTextLabel.h:14
ProgressTextLabel(QWidget *parent=nullptr)
Definition: ProgressTextLabel.cpp:6
void paintEvent(QPaintEvent *event)
Definition: ProgressTextLabel.cpp:47
QBrush pattern_brush_
Definition: ProgressTextLabel.h:12
bool msg_visible
Definition: ProgressTextLabel.h:15
int animation_
Definition: ProgressTextLabel.h:13
void setProgress(float progress)
Definition: ProgressTextLabel.cpp:42
void setElementVisible(bool bar, bool msg)
Definition: ProgressTextLabel.cpp:36
QTimer timer_
Definition: ProgressTextLabel.h:11
float progress_
Definition: ProgressTextLabel.h:10