summaryrefslogtreecommitdiffstats
path: root/src/progress.h
blob: 23b54eeb197eb98fd931f22c982d6c19ad49ab6c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef _PROGRESS_H_
#define _PROGRESS_H_

#include <QWidget>

class QProgressBar;
class QResizeEvent;
class QLabel;

class Progress : public QWidget
{
    Q_OBJECT
public:
    explicit Progress(QString text, QWidget *parent = nullptr);
    ~Progress();

    void setProgress(int percent);
    void setCaption(const QString& caption);

protected:
    virtual void resizeEvent(QResizeEvent *event) override;

private:
    QLabel *_label;
    QProgressBar *_progress;
    bool _hidden;
};

#endif