summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/messagebox.cc31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/messagebox.cc b/src/messagebox.cc
index 11126db..75e095e 100644
--- a/src/messagebox.cc
+++ b/src/messagebox.cc
@@ -27,6 +27,9 @@
*/
/*
* $Log$
+ * Revision 1.8 2005/05/01 16:45:48 deva
+ * Icons added to messagebox.
+ *
* Revision 1.7 2005/05/01 09:56:26 deva
* Added Id and Log tags to all files
*
@@ -50,20 +53,11 @@ MessageBox::MessageBox(QWidget* parent,
{
setCaption(name);
QFrame *topf = new QFrame(this);
- topf->setFrameStyle(QFrame::Box | QFrame::Raised);
- topf->setLineWidth(3);
+ topf->setFrameStyle(QFrame::Box | QFrame::Raised);
+ topf->setLineWidth(3);
QVBoxLayout *bl = new QVBoxLayout(this);
bl->addWidget(topf);
- QLabel *lbl_text = new QLabel(topf);
- lbl_text->setText(text);
- lbl_text->setFont(QFont("Arial", 18));
- QFrame *f = new QFrame(topf);
-
- QVBoxLayout *blayout = new QVBoxLayout(topf, 20, 20);
- blayout->addWidget(lbl_text);
- blayout->addWidget(f);
-
// Setup the icon
pix_icon = new QPixmap();
switch(icon) {
@@ -110,7 +104,20 @@ MessageBox::MessageBox(QWidget* parent,
break;
}
}
-
+ QLabel *lbl_icon = new QLabel(topf);
+ lbl_icon->setPixmap(*pix_icon);
+
+ QLabel *lbl_text = new QLabel(topf);
+ lbl_text->setText(text);
+ lbl_text->setFont(QFont("Arial", 18));
+ QFrame *f = new QFrame(topf);
+
+ QVBoxLayout *blayout = new QVBoxLayout(topf, 20, 20);
+
+ blayout->addWidget(lbl_icon);
+ blayout->addWidget(lbl_text);
+ blayout->addWidget(f);
+
// Setup the buttons
switch(type) {
case TYPE_OK: