#ifndef FORMFINISHED_H
#define FORMFINISHED_H

#include <QWidget>
#include <QLabel>

#include "DataTypeDef.h"

namespace Ui {
class FormFinished;
}

class FormFinished : public QWidget
{
    Q_OBJECT

public:
    explicit FormFinished(int gun_id, QWidget *parent = nullptr);
    ~FormFinished();

    void refreshChargingBackground();
    void setFinishTips(const int& state);

private:
    void initWidget();

    void setBackground(QLabel* label, const QString& imageUrl);

    void initFinishBackgroundImage();
    void initPowerBackground();
    void initDurationBackground();
    void initPriceBackground();

    void setOnceLayoutStrect(const bool& is_once);

private:
    Ui::FormFinished *ui;
    QLabel* finish_bg_image;
    QLabel* power_bg_image;
    QLabel* duration_bg_image;
    QLabel* price_bg_image;

    uint32_t m_gun_id;

    ccu_config_info_t m_ccu_cfg;
    tcu_config_info_t m_tcu_cfg;
    int m_finish_state;
};

#endif // FORMFINISHED_H
