summaryrefslogtreecommitdiff
path: root/message_box.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'message_box.cpp')
-rw-r--r--message_box.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/message_box.cpp b/message_box.cpp
new file mode 100644
index 0000000..65ef798
--- /dev/null
+++ b/message_box.cpp
@@ -0,0 +1,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();
+}