#ifndef TIP_BURNRESULT_H
#define TIP_BURNRESULT_H

#include <QDialog>
#include <QMutex>
#include <QAbstractButton>
#include "src/view/mainwindow.h"

namespace Ui {
class Tip_BurnResult;
}

class Tip_BurnResult : public QDialog
{
    Q_OBJECT

public:
    explicit Tip_BurnResult(QWidget *parent = nullptr);
    ~Tip_BurnResult();
    //static success(QString title, QString text);
    //static fail(QString title, QString text);
    void init(){}
    void destroy() { delete this; }
    static Tip_BurnResult *instance();
    void updatePosition(QPoint);

signals:
    void success(QString);
    void fail(QString);

public slots:
    void slotsSuccess(QString);
    void slotsFailed(QString);
    void slotsTitle(QString);
    void slotsClose();

protected:
    void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;

private slots:
    void on_buttonBox_clicked(QAbstractButton *button);

private:
    Ui::Tip_BurnResult *ui;
private:
    static Tip_BurnResult *m_oInstance;
    static QMutex       m_oMutex;
    bool                m_bIsWayland;
    QPushButton *m_oEnsureBtn;
};
#define TIP_BURNRESULT Tip_BurnResult::instance()
#endif // TIP_BURNRESULT_H
