1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/***************************************************************************
splashscreen.h - description
-------------------
begin : Fri Nov 30 2001
copyright : (C) 2001 by Matthias Messmer &
Carsten Niehaus &
Robert Gogolok
email : bmlmessmer@web.de &
cniehaus@gmx.de &
mail@robert-gogolok.de
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
// Qt includes
#include <tqcanvas.h>
#include <tqtimer.h>
// KDE includes
#include <kstandarddirs.h>
// local includes
#include "kpercentage.h"
#include "ksplashscreen.h"
/* creates the splash window without titlebar and border */
KSplashScreen::KSplashScreen( KPercentage *percentage, const char *name ) :
KDialog( 0L, name, FALSE, TQWidget::WStyle_Customize | TQWidget::WStyle_NoBorder )
{
percentage_window = percentage;
resize( 380, 300 );
/* load the background pixmap */
TQPixmap bgp( locate( "data", "kpercentage/pics/splash.png" ) );
/* wait some time and start the main window */
TQCanvas *canvas = new TQCanvas( this );
canvas->resize( 400, 300 );
/* set the background pixmap */
canvas->setBackgroundPixmap( bgp );
//remove version number from splash annma 14/02/2005
//TQCanvasText *t = new TQCanvasText( KPERCENTAGE_VERSION, canvas );
//t->move( 330.0, 260.0 );
//t->show();
canvas->setAllChanged();
canvas->update();
TQCanvasView *view = new TQCanvasView( canvas, this, "", TQCanvasView::WStyle_Customize | TQCanvasView::WStyle_NoBorder );
view->resize( 380, 300 );
view->setVScrollBarMode( TQCanvasView::AlwaysOff );
view->setHScrollBarMode( TQCanvasView::AlwaysOff );
view->setFrameStyle( TQCanvasView::NoFrame );
view->show();
TQTimer::singleShot( 2000, this, TQT_SLOT( showPercentage() ) );
}
/* show the main window and close the splah window */
void KSplashScreen::showPercentage()
{
percentage_window->show();
delete( this );
}
#include "ksplashscreen.moc"
|