summaryrefslogtreecommitdiff
path: root/src/messagebox.cc
diff options
context:
space:
mode:
authordeva <deva>2005-05-01 16:45:48 +0000
committerdeva <deva>2005-05-01 16:45:48 +0000
commit96e869ac64acad8f6329f2d0333cc7f7f95436b0 (patch)
tree002bdc036d68d5b7227e43dce7412419d5844752 /src/messagebox.cc
parentb2a00c2722cb33ea7d0eb81bd8895952706c71e6 (diff)
Icons added to messagebox.
Diffstat (limited to 'src/messagebox.cc')
-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: