#ifndef DIALOGERRORNOTECODE_H
#define DIALOGERRORNOTECODE_H

#include <QDialog>
#include <QLabel>

#include "DataTypeDef.h"

namespace Ui {
class DialogErrorNoteCode;
}

class DialogErrorNoteCode : public QDialog
{
    Q_OBJECT

public:
    explicit DialogErrorNoteCode(QWidget *parent = nullptr);
    ~DialogErrorNoteCode();

    void clear();

    ERROR_NOTE error_info() const;
    void setError_info(const ERROR_NOTE &newError_info);

private:
    void initConnect();

    void refreshData();
    void updateData();

    void setBackground();
    void centerWindow();

protected:
    void showEvent(QShowEvent* event) override;

private:
    Ui::DialogErrorNoteCode *ui;
    QLabel* m_background;
    ERROR_NOTE m_error_info;
};

#endif // DIALOGERRORNOTECODE_H
