kontact Library API Documentation

splash.cpp

00001 /* 00002 This file is part of the KDE project 00003 Copyright (C) 2002 Daniel Molkentin <molkentin@kde.org> 00004 00005 This program is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; see the file COPYING. If not, write to 00017 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018 Boston, MA 02111-1307, USA. 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"
KDE Logo
This file is part of the documentation for kontact Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 27 12:53:45 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003