00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "newmaildialog.h"
00019 #include <kdebug.h>
00020
00021 NewMailDialog::NewMailDialog( QWidget* parent ): KDialog( parent )
00022 {
00023 setCaption( "KShowmail" );
00024
00025
00026 setButtonText( KDialog::Cancel, i18n( "Show main mindow" ) );
00027 setButtonToolTip( KDialog::Cancel, i18n( "Shows the main window" ) );
00028 setButtonWhatsThis( KDialog::Cancel, i18n( "Shows the main window" ) );
00029 setButtonIcon( KDialog::Cancel, KIcon( "kshowmail" ) );
00030
00031
00032 QFont font( "Sans Serif", 12 );
00033 font.setBold( true );
00034
00035
00036 QPixmap pic( KStandardDirs::locate( "data", "kshowmail/pics/newMailPic.png" ) );
00037
00038
00039 QWidget* mainWidget = new QWidget( this );
00040 QHBoxLayout* layMain = new QHBoxLayout;
00041
00042 QLabel* lblPic = new QLabel();
00043 lblPic->setPixmap( pic );
00044 lblPic->setAlignment( Qt::AlignCenter );
00045 layMain->addWidget( lblPic );
00046
00047 QLabel* lblText = new QLabel( i18n( "New mail has arrived!" ) );
00048 lblText->setAlignment( Qt::AlignCenter );
00049 lblText->setFont( font );
00050 layMain->addWidget( lblText );
00051
00052 mainWidget->setLayout( layMain );
00053
00054 setMainWidget( mainWidget );
00055 }