Use an .ini config file for environment vars in bitcoin-util-test.py
[bitcoinplatinum.git] / src / qt / splashscreen.h
blob95a65cc53c69e0c2b0bcd5c7a31d87387c13dba3
1 // Copyright (c) 2011-2016 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_QT_SPLASHSCREEN_H
6 #define BITCOIN_QT_SPLASHSCREEN_H
8 #include <QSplashScreen>
10 class CWallet;
11 class NetworkStyle;
13 /** Class for the splashscreen with information of the running client.
15 * @note this is intentionally not a QSplashScreen. Bitcoin Core initialization
16 * can take a long time, and in that case a progress window that cannot be
17 * moved around and minimized has turned out to be frustrating to the user.
19 class SplashScreen : public QWidget
21 Q_OBJECT
23 public:
24 explicit SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle);
25 ~SplashScreen();
27 protected:
28 void paintEvent(QPaintEvent *event);
29 void closeEvent(QCloseEvent *event);
31 public Q_SLOTS:
32 /** Slot to call finish() method as it's not defined as slot */
33 void slotFinish(QWidget *mainWin);
35 /** Show message and progress */
36 void showMessage(const QString &message, int alignment, const QColor &color);
38 private:
39 /** Connect core signals to splash screen */
40 void subscribeToCoreSignals();
41 /** Disconnect core signals to splash screen */
42 void unsubscribeFromCoreSignals();
43 /** Connect wallet signals to splash screen */
44 void ConnectWallet(CWallet*);
46 QPixmap pixmap;
47 QString curMessage;
48 QColor curColor;
49 int curAlignment;
51 QList<CWallet*> connectedWallets;
54 #endif // BITCOIN_QT_SPLASHSCREEN_H