#ifndef SETUPWAITPROGRESSBAR_H
#define SETUPWAITPROGRESSBAR_H

#include <QWidget>

class ColorProgressBar;

class QTimer;
class QVBoxLayout;
class QLabel;
class QTextBrowser;

class SetupWaitProgressBar : public QWidget
{
    Q_OBJECT
public:
    explicit SetupWaitProgressBar(QWidget* parent = nullptr);
    ~SetupWaitProgressBar();

    void setValue(int value);

    void setBgImagePath(const QString& path);
    void setBgImageOpacity(float opacity);

    void show();

signals:
    void completed();

protected:
    void paintEvent(QPaintEvent* event);

private:
    void initialize();
    void createConnections();

private slots:
    void slotUpdateValue();



private:
    QVBoxLayout* mMainVLayout;

    QLabel* mTitleLabel;
    ColorProgressBar* mColorProgressBar;
    QTextBrowser* mInfoTextBrowser;

    QTimer* mTimer;
    QString m_sBgImagePath;
    float m_fBgImageOpacity;

    bool m_bSetup;
    QString mTitle;
    int mDotIndex;
};

#endif // SETUPWAITPROGRESSBAR_H
