summaryrefslogtreecommitdiff
path: root/message_box.cpp
blob: 65ef7989563db173688576be3b51afade8a1cea6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "message_box.h"

message_box::message_box()
{

}

void message_box::info_box(QString message, QString title)
{
    QMessageBox msgbox;
    msgbox.setWindowTitle(title);
    msgbox.setText(message);
    msgbox.exec();
}

int message_box::confirm_box(QString warning, QString message, QString title)
{
    /* returns 1 for yes, 0 for no */
    QMessageBox msgbox;
    msgbox.setWindowTitle(title);
    msgbox.setText(warning);
    msgbox.setInformativeText(message);
    msgbox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
    msgbox.setDefaultButton(QMessageBox::No);
    return msgbox.exec();
}