~ubuntu-branches/ubuntu/trusty/kvirc/trusty-proposed

« back to all changes in this revision

Viewing changes to src/kvirc/ui/KviSplashScreen.h

  • Committer: Bazaar Package Importer
  • Author(s): Kai Wasserbäch, Kai Wasserbäch, Raúl Sánchez Siles
  • Date: 2011-02-12 10:40:21 UTC
  • mfrom: (14.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110212104021-5mh4f75jlku20mnt
The combined "Twisted Experiment" and "Nocturnal Raid" release.

[ Kai Wasserbäch ]
* Synced to upstream's SVN revision 5467.
* debian/rules:
  - Added .PHONY line.
  - Resurrect -DMANUAL_REVISION, got lost somewhere and we build SVN
    revisions again.
  - Replace "-DWITH_NO_EMBEDDED_CODE=YES" with "-DWANT_CRYPTOPP=YES".
  - Change the remaining -DWITH/-DWITHOUT to the new -DWANT syntax.
* debian/control:
  - Removed DMUA, I'm a DD now.
  - Changed my e-mail address.
  - Removed unneeded relationships (no upgrades over two releases are
    supported).
  - Fix Suggests for kvirc-dbg.
  - kvirc-data: Make the "Suggests: kvirc" a Recommends, doesn't make much
    sense to install the -data package without the program.
* debian/source/local-options: Added with "unapply-patches".
* debian/kvirc.lintian-overrides: Updated to work for 4.1.1.
* debian/patches/21_make_shared-mime-info_B-D_superfluous.patch: Updated.
* debian/kvirc-data.install: Added .notifyrc.

[ Raúl Sánchez Siles ]
* Stating the right version where kvirc-data break and replace should happen.
* Fixing link to license file.
* Added French and Portuguese man pages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _KVI_SPLASH_H_
 
2
#define _KVI_SPLASH_H_
 
3
//=============================================================================
 
4
//
 
5
//   File : KviSplashScreen.h
 
6
//   Creation date : Wed Aug 8 2001 17:45:12 CEST by Szymon Stefanek
 
7
//
 
8
//   This file is part of the KVIrc irc client distribution
 
9
//   Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net)
 
10
//
 
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.
 
15
//
 
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.
 
20
//
 
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.
 
24
//
 
25
//=============================================================================
 
26
 
 
27
/**
 
28
* \file KviSplashScreen.h
 
29
* \author Szymon Stefanek
 
30
* \brief Splash screen
 
31
*
 
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
 
34
*/
 
35
 
 
36
#include "kvi_settings.h"
 
37
 
 
38
#include <QFrame>
 
39
#include <QProgressBar>
 
40
#include <QLabel>
 
41
#include <QTimer>
 
42
#include <QDateTime>
 
43
#include <QSplashScreen>
 
44
#include <QPixmap>
 
45
 
 
46
#define KVI_SPLASH_SCREEN_MINIMUM_TIMEOUT_IN_MSECS 2000
 
47
 
 
48
#define KVI_SPLASH_SET_PROGRESS(__val) \
 
49
        if(g_pSplashScreen) \
 
50
                g_pSplashScreen->setProgress(__val);
 
51
 
 
52
//#define KVI_SPLASH_SET_TEXT(__txt) if(g_pSplashScreen){ g_pSplashScreen->message(__txt); qDebug(__txt.latin1()); }
 
53
 
 
54
/**
 
55
* \class KviSplashScreen
 
56
* \brief Splash screen class
 
57
*/
 
58
class KVIRC_API KviSplashScreen : public QSplashScreen
 
59
{
 
60
        Q_OBJECT
 
61
public:
 
62
        /**
 
63
        * \brief Constructs the splash screen object
 
64
        * \return KviSplashScreen
 
65
        */
 
66
        KviSplashScreen();
 
67
 
 
68
        /**
 
69
        * \brief Destroys the splash screen object
 
70
        */
 
71
        virtual ~KviSplashScreen();
 
72
private:
 
73
        QTimer  * m_pTimer;
 
74
        QTime     m_creationTime;
 
75
        QPixmap * m_pOverlay;
 
76
        bool      m_bIncreasing;
 
77
        qreal     m_rTransparency;
 
78
        QTimer  * m_pFadeTimer;
 
79
public:
 
80
        /**
 
81
        * \brief Sets the progress in steps
 
82
        * \param iProgress The progress step
 
83
        * \return void
 
84
        */
 
85
        void setProgress(int iProgress);
 
86
 
 
87
        /**
 
88
        * \brief Kills the splash screen
 
89
        * \return void
 
90
        */
 
91
        void die();
 
92
 
 
93
        //void message(QString);
 
94
protected slots:
 
95
        /**
 
96
        * \brief Called when we want to kill the splash screen
 
97
        * \return void
 
98
        */
 
99
        void suicide();
 
100
 
 
101
        /**
 
102
        * \brief Sets the fading effect
 
103
        * \return void
 
104
        */
 
105
        void fadeTimerShot();
 
106
protected:
 
107
        virtual void showEvent(QShowEvent * e);
 
108
        virtual void hideEvent(QHideEvent * e);
 
109
};
 
110
 
 
111
extern KVIRC_API KviSplashScreen * g_pSplashScreen;
 
112
 
 
113
#endif //_KVI_SPLASH_H_