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 00024 #include <kapplication.h> 00025 #include <kglobalsettings.h> 00026 #include <kiconloader.h> 00027 00028 #include "splash.h" 00029 00030 using namespace Kontact; 00031 00032 Splash::Splash( QWidget *parent, const char *name ) 00033 : QLabel( parent, name, WStyle_Customize | WStyle_Splash ) 00034 { 00035 QPixmap splash( UserIcon( "splash" ) ); 00036 setBackgroundPixmap( splash ); 00037 resize( splash.width(), splash.height() ); 00038 00039 QRect desk = KGlobalSettings::splashScreenDesktopGeometry(); 00040 00041 setGeometry( ( desk.width() / 2 ) - ( width() / 2 ) + desk.left(), 00042 ( desk.height() / 2 ) - ( height() / 2 ) + desk.top(), 00043 width(), height() ); 00044 } 00045 00046 #include "splash.moc"
KDE Logo
This file is part of the documentation for kontact Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:58:15 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003