]>
Commit | Line | Data |
---|---|---|
f914f1a7 | 1 | // Copyright (c) 2011-2014 The Bitcoin Core developers |
78253fcb | 2 | // Distributed under the MIT software license, see the accompanying |
e592d43f WL |
3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. |
4 | ||
84738627 PJ |
5 | #ifndef BITCOIN_QT_SPLASHSCREEN_H |
6 | #define BITCOIN_QT_SPLASHSCREEN_H | |
f9124587 JS |
7 | |
8 | #include <QSplashScreen> | |
9 | ||
6de50c3c WL |
10 | class NetworkStyle; |
11 | ||
cfc5cfb0 WL |
12 | /** Class for the splashscreen with information of the running client. |
13 | * | |
14 | * @note this is intentionally not a QSplashScreen. Bitcoin Core initialization | |
15 | * can take a long time, and in that case a progress window that cannot be | |
16 | * moved around and minimized has turned out to be frustrating to the user. | |
f9124587 | 17 | */ |
a49f11d9 | 18 | class SplashScreen : public QWidget |
f9124587 JS |
19 | { |
20 | Q_OBJECT | |
21 | ||
22 | public: | |
6de50c3c | 23 | explicit SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle); |
35ecf854 WL |
24 | ~SplashScreen(); |
25 | ||
a49f11d9 | 26 | protected: |
cfc5cfb0 WL |
27 | void paintEvent(QPaintEvent *event); |
28 | void closeEvent(QCloseEvent *event); | |
a49f11d9 | 29 | |
e092f229 | 30 | public Q_SLOTS: |
35ecf854 WL |
31 | /** Slot to call finish() method as it's not defined as slot */ |
32 | void slotFinish(QWidget *mainWin); | |
33 | ||
a49f11d9 WL |
34 | /** Show message and progress */ |
35 | void showMessage(const QString &message, int alignment, const QColor &color); | |
36 | ||
35ecf854 WL |
37 | private: |
38 | /** Connect core signals to splash screen */ | |
39 | void subscribeToCoreSignals(); | |
40 | /** Disconnect core signals to splash screen */ | |
41 | void unsubscribeFromCoreSignals(); | |
a49f11d9 WL |
42 | |
43 | QPixmap pixmap; | |
44 | QString curMessage; | |
45 | QColor curColor; | |
46 | int curAlignment; | |
f9124587 JS |
47 | }; |
48 | ||
84738627 | 49 | #endif // BITCOIN_QT_SPLASHSCREEN_H |