#ifndef FORMLOCALAUTHLIST_H
#define FORMLOCALAUTHLIST_H

#include <QWidget>
#include "BaseWidget.h"
#include "DataTypeDef.h"
#include "OcppSettings/FormAuthCardDetail.h"

namespace Ui {
class FormLocalAuthList;
}

class FormLocalAuthList : public BaseWidget
{
    Q_OBJECT

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

    bool returnParent() override;

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

    void refreshData();
    void tableWidgetAppendRow(const AUTH_CARD_INFO& info);
    void updateData();

protected:
    void showEvent(QShowEvent* event) override;

private:
    Ui::FormLocalAuthList *ui;
    QList<AUTH_CARD_INFO> m_auth_list;
    QScopedPointer<FormAuthCardDetail> m_auth_card_info;
};

#endif // FORMLOCALAUTHLIST_H
