Bitcoin
splashscreen.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2018 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.
4 
5 #ifndef BITCOIN_QT_SPLASHSCREEN_H
6 #define BITCOIN_QT_SPLASHSCREEN_H
7 
8 #include <QWidget>
9 
10 #include <memory>
11 
12 class NetworkStyle;
13 
14 namespace interfaces {
15 class Handler;
16 class Node;
17 class Wallet;
18 };
19 
26 class SplashScreen : public QWidget
27 {
28  Q_OBJECT
29 
30 public:
31  explicit SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const NetworkStyle *networkStyle);
32  ~SplashScreen();
33 
34 protected:
35  void paintEvent(QPaintEvent *event);
36  void closeEvent(QCloseEvent *event);
37 
38 public Q_SLOTS:
40  void finish();
41 
43  void showMessage(const QString &message, int alignment, const QColor &color);
44 
45 protected:
46  bool eventFilter(QObject * obj, QEvent * ev);
47 
48 private:
54  void ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet);
55 
56  QPixmap pixmap;
57  QString curMessage;
58  QColor curColor;
60 
62  std::unique_ptr<interfaces::Handler> m_handler_init_message;
63  std::unique_ptr<interfaces::Handler> m_handler_show_progress;
64  std::unique_ptr<interfaces::Handler> m_handler_load_wallet;
65  std::list<std::unique_ptr<interfaces::Wallet>> m_connected_wallets;
66  std::list<std::unique_ptr<interfaces::Handler>> m_connected_wallet_handlers;
67 };
68 
69 #endif // BITCOIN_QT_SPLASHSCREEN_H
~SplashScreen()
Definition: splashscreen.cpp:132
QPixmap pixmap
Definition: splashscreen.h:56
QColor curColor
Definition: splashscreen.h:58
void closeEvent(QCloseEvent *event)
Definition: splashscreen.cpp:221
void subscribeToCoreSignals()
Definition: splashscreen.cpp:182
void finish()
Definition: splashscreen.cpp:147
std::unique_ptr< interfaces::Handler > m_handler_load_wallet
Definition: splashscreen.h:64
std::unique_ptr< interfaces::Handler > m_handler_init_message
Definition: splashscreen.h:62
void showMessage(const QString &message, int alignment, const QColor &color)
Definition: splashscreen.cpp:204
SplashScreen(interfaces::Node &node, Qt::WindowFlags f, const NetworkStyle *networkStyle)
Definition: splashscreen.cpp:28
interfaces::Node & m_node
Definition: splashscreen.h:61
f
Definition: linearize-data.py:263
std::list< std::unique_ptr< interfaces::Handler > > m_connected_wallet_handlers
Definition: splashscreen.h:66
Definition: networkstyle.h:13
void unsubscribeFromCoreSignals()
Definition: splashscreen.cpp:192
Definition: dummywallet.cpp:11
Top-level interface for a bitcoin node (bitcoind process).
Definition: node.h:36
int curAlignment
Definition: splashscreen.h:59
void ConnectWallet(std::unique_ptr< interfaces::Wallet > wallet)
Definition: splashscreen.h:26
QString curMessage
Definition: splashscreen.h:57
std::unique_ptr< interfaces::Handler > m_handler_show_progress
Definition: splashscreen.h:63
bool eventFilter(QObject *obj, QEvent *ev)
Definition: splashscreen.cpp:137
std::list< std::unique_ptr< interfaces::Wallet > > m_connected_wallets
Definition: splashscreen.h:65
void paintEvent(QPaintEvent *event)
Definition: splashscreen.cpp:212