splashscreen.h 1.86 KB
Newer Older
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
/***************************************************************************
                          splashscreen.h  -  description
                             -------------------
    begin                : Sun Dec 8 2002
    copyright            : (C) 2002 by Scott Wheeler
    email                : wheeler@kde.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef SPLASHSCREEN_H
#define SPLASHSCREEN_H

#include <qhbox.h>

class QLabel;

/**
 * Well, all of this session restoration sure is fun, but it's starting to take
 * a while, especially say, if you're building KDE and indexing your file system
28
 * in the background.  ;-)  So, despite my general hate of splashscreens I
29 30
 * thought on appropriate here.
 *
31
 * As in other places, this is a singleton.  That makes it relatively easy to
32 33 34 35
 * handle the updates from whichever class seems appropriate through static
 * methods.
 */

36
class SplashScreen : public QHBox
37
{
38
public:
39 40 41 42 43 44 45 46 47
    static SplashScreen *instance();
    static void finishedLoading();
    static void increment();

protected:
    SplashScreen();
    virtual ~SplashScreen();

private:
48 49
    void processEvents();

50 51 52 53
    static SplashScreen *splash;
    static bool done;
    static int count;

54
    QLabel *m_countLabel;
55 56 57
};

#endif