/**
 * 弹框提示
 *
 * © 2023 成都河狸智能科技有限责任公司。保留所有权利。
 *
 * 作者: zhq1229
 */

#ifndef __MESSAGE_DIALOG_H__
#define __MESSAGE_DIALOG_H__

#include <QDialog>
enum MessageLevel {
    MESSAGE_LEVEL_INFO,
    MESSAGE_LEVEL_SUCCEESS,
    MESSAGE_LEVEL_WARNING,
    MESSAGE_LEVEL_ERROR,
};

namespace Ui {
class messageDialog;
}

class MessageDialog : public QDialog
{
    Q_OBJECT

public:
    explicit MessageDialog(
        QString message,
        QString detail = "",
        MessageLevel level = MESSAGE_LEVEL_INFO,
        bool ok_button = true,
        bool cancel_button = true,
        QWidget* parent = nullptr);
    ~MessageDialog();

private slots:
    void __cancelButtonClicked();
    void __okButtonClicked();

private:
    Ui::messageDialog* ui_;
};

#endif // __MESSAGE_DIALOG_H__
