splash.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <qcursor.h>
00022 #include <qdesktopwidget.h>
00023 #include <qlabel.h>
00024 #include <qprogressbar.h>
00025
00026 #include <kapplication.h>
00027 #include <kglobalsettings.h>
00028 #include <kiconloader.h>
00029
00030 #include "splash.h"
00031
00032 using namespace Kontact;
00033
00034 Splash::Splash( QWidget *parent, const char *name )
00035 : QVBox( parent, name, WStyle_Customize | WStyle_Splash )
00036 {
00037 QLabel *lbl = new QLabel( this );
00038 QPixmap splash( UserIcon( "splash" ) );
00039 lbl->setBackgroundPixmap( splash );
00040 mProgressBar = new QProgressBar( this );
00041 resize( splash.size() );
00042 setFrameStyle( QFrame::Box | QFrame::Plain );
00043
00044 QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
00045
00046 setGeometry( ( desk.width() / 2 ) - ( width() / 2 ) + desk.left(),
00047 ( desk.height() / 2 ) - ( height() / 2 ) + desk.top(),
00048 width(), height() );
00049 }
00050
00051 #include "splash.moc"
This file is part of the documentation for kontact Library Version 3.3.2.