summaryrefslogtreecommitdiff
path: root/src/messagebox.h
diff options
context:
space:
mode:
authordeva <deva>2005-03-24 13:07:30 +0000
committerdeva <deva>2005-03-24 13:07:30 +0000
commit50adc3e1f496246e0d91a831eebd4fbb730dff1c (patch)
tree7b0e4da6992a1be55d77cdc997c2543451cd8a35 /src/messagebox.h
parent9466b3042bc7314915a15f499bd0b087f569654d (diff)
Added icon support for the MessageBox.
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);
};