From 96e869ac64acad8f6329f2d0333cc7f7f95436b0 Mon Sep 17 00:00:00 2001 From: deva Date: Sun, 1 May 2005 16:45:48 +0000 Subject: Icons added to messagebox. --- src/messagebox.cc | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'src') 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: -- cgit v1.2.3