#ifndef FORMTXPROFILE_H
#define FORMTXPROFILE_H

#include <QWidget>
#include "BaseWidget.h"

#include "DataTypeDef.h"

namespace Ui {
class FormTxProfile;
}

class FormTxProfile : public BaseWidget
{
    Q_OBJECT

public:
    explicit FormTxProfile(BaseWidget *parent = nullptr);
    ~FormTxProfile();

    bool returnParent() override;

    charging_profiles_detail_info_t profile_info() const;
    void setProfile_info(charging_profiles_detail_info_t newProfile_info);

private:
    void initWidget();
    void initConnect();

    void refreshStackLevelCombox(const int& maxStacklevel);

    void refreshData();
    void refreshChargingRateUnit(const QString& curUnit);
    bool updateData();

protected:
    void showEvent(QShowEvent *event) override;

private:
    Ui::FormTxProfile *ui;

    charging_profiles_detail_info_t m_profile_info;
};

#endif // FORMTXPROFILE_H
