BSHA3  0.17.99
P2P Blockchain, based on 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 <functional>
9 #include <QSplashScreen>
10 
11 #include <memory>
12 
13 class NetworkStyle;
14 
15 namespace interfaces {
16 class Handler;
17 class Node;
18 class Wallet;
19 };
20 
27 class SplashScreen : public QWidget
28 {
29  Q_OBJECT
30 
31 public:
32  explicit SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const NetworkStyle *networkStyle);
33  ~SplashScreen();
34 
35 protected:
36  void paintEvent(QPaintEvent *event);
37  void closeEvent(QCloseEvent *event);
38 
39 public Q_SLOTS:
41  void slotFinish(QWidget *mainWin);
42 
44  void showMessage(const QString &message, int alignment, const QColor &color);
45 
46 protected:
47  bool eventFilter(QObject * obj, QEvent * ev);
48 
49 private:
55  void ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet);
56 
57  QPixmap pixmap;
58  QString curMessage;
59  QColor curColor;
61 
63  std::unique_ptr<interfaces::Handler> m_handler_init_message;
64  std::unique_ptr<interfaces::Handler> m_handler_show_progress;
65  std::unique_ptr<interfaces::Handler> m_handler_load_wallet;
66  std::list<std::unique_ptr<interfaces::Wallet>> m_connected_wallets;
67  std::list<std::unique_ptr<interfaces::Handler>> m_connected_wallet_handlers;
68 };
69 
70 #endif // BITCOIN_QT_SPLASHSCREEN_H
bool eventFilter(QObject *obj, QEvent *ev)
void unsubscribeFromCoreSignals()
Disconnect core signals to splash screen.
std::unique_ptr< interfaces::Handler > m_handler_show_progress
Definition: splashscreen.h:64
void ConnectWallet(std::unique_ptr< interfaces::Wallet > wallet)
Connect wallet signals to splash screen.
void closeEvent(QCloseEvent *event)
std::unique_ptr< interfaces::Handler > m_handler_load_wallet
Definition: splashscreen.h:65
Class for the splashscreen with information of the running client.
Definition: splashscreen.h:27
std::unique_ptr< interfaces::Handler > m_handler_init_message
Definition: splashscreen.h:63
std::list< std::unique_ptr< interfaces::Wallet > > m_connected_wallets
Definition: splashscreen.h:66
SplashScreen(interfaces::Node &node, Qt::WindowFlags f, const NetworkStyle *networkStyle)
void subscribeToCoreSignals()
Connect core signals to splash screen.
void paintEvent(QPaintEvent *event)
void showMessage(const QString &message, int alignment, const QColor &color)
Show message and progress.
std::list< std::unique_ptr< interfaces::Handler > > m_connected_wallet_handlers
Definition: splashscreen.h:67
QString curMessage
Definition: splashscreen.h:58
QPixmap pixmap
Definition: splashscreen.h:57
void slotFinish(QWidget *mainWin)
Slot to call finish() method as it&#39;s not defined as slot.
QColor curColor
Definition: splashscreen.h:59
interfaces::Node & m_node
Definition: splashscreen.h:62
Top-level interface for a bitcoin node (bsha3d process).
Definition: node.h:35