/***************************************************************************
                          splashscreen.cpp  -  description
                             -------------------
    begin                : Thu Nov 1 2001
    copyright            : (C) 2001 by Primoz Anzur 
    email                : zerokode@gmx.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include "splashscreen.h"
#include "kdebug.h"

#include <kglobalsettings.h>

SplashScreen::SplashScreen(QWidget *parent, const char *name):QFrame(parent,name,QWidget::WStyle_NoBorder | QWidget::WStyle_Customize)
{
	QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
	setGeometry ( desk.center().x()-160, desk.center().y()-120, 302,302 );
	setFrameStyle( QFrame::Box | QFrame::Raised );
	setLineWidth( 1 );
	setBackgroundPixmap(QPixmap(locate("data","kmessedwords/splash.png")));
	QTimer::singleShot( 1000, this, SLOT(showMainWindow()) );
}

SplashScreen::~SplashScreen(){
}

void SplashScreen::closeEvent(QCloseEvent *)
{
	exit(0);
}

void SplashScreen::showMainWindow()
{
	loadMain.show();
	this->hide();
}

#include "splashscreen.moc"
