/***************************************************************************
                          klatinsplash.cpp  -  description
                             -------------------
    begin                : Tue Dec 18 2001
    copyright            : (C) 2001 by George Wright
    email                : gwright@users.sourceforge.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 <qtimer.h>

#include <kstddirs.h>
#include "klatin.h"
#include "klatinsplash.h"

KLatinSplash::KLatinSplash(QWidget* parent, const char *name)
		: QWidget(parent, name, QWidget::WStyle_NoBorder | QWidget::WStyle_Customize)
{
	splash.load(locate("data", "klatin/splash.png"));
	setBackgroundPixmap(splash);
	setGeometry( QApplication::desktop()->width ()/2-splash.width()/2,
		QApplication::desktop()->height()/2-splash.height()/2,
		splash.width(), splash.height() );
		
	QTimer *bomb = new QTimer(this);
	connect( bomb, SIGNAL(timeout()), this, SLOT(unload()) );
	bomb->start( 2000, TRUE );

}

KLatinSplash::~KLatinSplash()
{
}

void KLatinSplash::unload()
{
	KLatin *klatin = new KLatin();
	klatin->show();
	klatin->setGeometry(0,0,320,240);
	hide();
}
