summaryrefslogtreecommitdiff
path: root/src/messagebox.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/messagebox.h')
-rw-r--r--src/messagebox.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/messagebox.h b/src/messagebox.h
index 11a1c05..28b06a8 100644
--- a/src/messagebox.h
+++ b/src/messagebox.h
@@ -32,6 +32,16 @@
#include <qlayout.h>
#include <qpushbutton.h>
#include <qlabel.h>
+#include <qpixmap.h>
+
+typedef enum {
+ ICON_NONE, // No icon is used
+ ICON_DEFAULT, // An icon matching the buttons is used
+ ICON_INFO, // An info icon (matching the ok button)
+ ICON_WARN, // An warning icon (matching the ok/cancel button)
+ ICON_ERROR, // An critical error icon
+ ICON_QUESTION // An question icon (matching the yes/no and yes/no/cancel buttons)
+} msg_icon;
typedef enum {
MSG_YES,
@@ -51,7 +61,12 @@ class MessageBox : public QDialog
{
Q_OBJECT
public:
- MessageBox(QWidget* parent = 0, const char* name = "", const char* text = "", msg_type type = TYPE_OK);
+ MessageBox(QWidget* parent = 0,
+ const char* name = "",
+ const char* text = "",
+ msg_type type = TYPE_OK,
+ msg_icon icon = ICON_DEFAULT);
+ ~MessageBox();
public slots:
void bok_clicked();
@@ -60,6 +75,7 @@ public slots:
void bno_clicked();
private:
+ QPixmap *pix_icon;
QPushButton *createButton(QWidget *parent, const char *text);
};