3
//=============================================================================
5
// File : KviSplashScreen.h
6
// Creation date : Wed Aug 8 2001 17:45:12 CEST by Szymon Stefanek
8
// This file is part of the KVIrc irc client distribution
9
// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net)
11
// This program is FREE software. You can redistribute it and/or
12
// modify it under the terms of the GNU General Public License
13
// as published by the Free Software Foundation; either version 2
14
// of the License, or (at your opinion) any later version.
16
// This program is distributed in the HOPE that it will be USEFUL,
17
// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
// See the GNU General Public License for more details.
21
// You should have received a copy of the GNU General Public License
22
// along with this program. If not, write to the Free Software Foundation,
23
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25
//=============================================================================
28
* \file KviSplashScreen.h
29
* \author Szymon Stefanek
30
* \brief Splash screen
32
* \def KVI_SPLASH_SCREEN_MINIMUM_TIMEOUT_IN_MSECS The minimum timeout in msec
33
* \def KVI_SPLASH_SET_PROGRESS Updates the splash screen progress bar
36
#include "kvi_settings.h"
39
#include <QProgressBar>
43
#include <QSplashScreen>
46
#define KVI_SPLASH_SCREEN_MINIMUM_TIMEOUT_IN_MSECS 2000
48
#define KVI_SPLASH_SET_PROGRESS(__val) \
50
g_pSplashScreen->setProgress(__val);
52
//#define KVI_SPLASH_SET_TEXT(__txt) if(g_pSplashScreen){ g_pSplashScreen->message(__txt); qDebug(__txt.latin1()); }
55
* \class KviSplashScreen
56
* \brief Splash screen class
58
class KVIRC_API KviSplashScreen : public QSplashScreen
63
* \brief Constructs the splash screen object
64
* \return KviSplashScreen
69
* \brief Destroys the splash screen object
71
virtual ~KviSplashScreen();
77
qreal m_rTransparency;
78
QTimer * m_pFadeTimer;
81
* \brief Sets the progress in steps
82
* \param iProgress The progress step
85
void setProgress(int iProgress);
88
* \brief Kills the splash screen
93
//void message(QString);
96
* \brief Called when we want to kill the splash screen
102
* \brief Sets the fading effect
105
void fadeTimerShot();
107
virtual void showEvent(QShowEvent * e);
108
virtual void hideEvent(QHideEvent * e);
111
extern KVIRC_API KviSplashScreen * g_pSplashScreen;
113
#endif //_KVI_SPLASH_H_