diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-17 01:24:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-17 01:24:36 +0000 |
commit | a8c9924456e5335c964e4e55b2dde1963c88726f (patch) | |
tree | f5bf107ba079ae460536da778ce2da5e6c68aa69 /knights/splash.cpp | |
download | knights-a8c9924456e5335c964e4e55b2dde1963c88726f.tar.gz knights-a8c9924456e5335c964e4e55b2dde1963c88726f.zip |
Added KDE3 version of Knights
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knights@1091568 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knights/splash.cpp')
-rw-r--r-- | knights/splash.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/knights/splash.cpp b/knights/splash.cpp new file mode 100644 index 0000000..cfccb62 --- /dev/null +++ b/knights/splash.cpp @@ -0,0 +1,40 @@ +/*************************************************************************** + splash.cpp - description + ------------------- + begin : Tue Jul 17 2001 + copyright : (C) 2003 by Troy Corbin Jr. + email : tcorbin@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 "splash.moc" +#include <qpixmap.h> +#include <kstddirs.h> +#include <kwin.h> +#include <qapplication.h> + +splash::splash() : + QWidget( 0, "splash", Qt::WStyle_Customize | Qt::WStyle_NoBorder ) +{ + QPixmap SplashImage( locate("data", "knights/splash.png" ) ); + setPaletteBackgroundPixmap( SplashImage ); + + QSize Hint = SplashImage.size(); + setFixedSize( Hint ); + + move( ( QApplication::desktop()->width() - Hint.width() ) / 2, + ( QApplication::desktop()->height() - Hint.height() ) / 2 ); + show(); + repaint( FALSE ); +} +splash::~splash() +{ +} |