#ifndef __CUSTOM_MESSAGE_BOX_H__
#define __CUSTOM_MESSAGE_BOX_H__

#include <QMessageBox>
#include <QPushButton>

class CustomMessageBox : public QMessageBox
{
    Q_OBJECT
public:
    using QMessageBox::QMessageBox;
    QPushButton *addButton(const QString &text, ButtonRole role);
    QPushButton *clickedButton();
    void setParent(QWidget *parent);
    int exec();

private:
    int m_ret{-1};
    QPushButton *m_yesButton{nullptr};
    QPushButton *m_noButton{nullptr};
};
#endif // __CUSTOM_MESSAGE_BOX_H__