Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
splashscreen.h
Go to the documentation of this file.
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.
4
5#ifndef BITCOIN_QT_SPLASHSCREEN_H
6#define BITCOIN_QT_SPLASHSCREEN_H
7
8#include <QWidget>
9
10#include <memory>
11
12class NetworkStyle;
13
14namespace interfaces {
15class Handler;
16class Node;
17class Wallet;
18}; // namespace interfaces
19
26class SplashScreen : public QWidget {
28
29public:
30 explicit SplashScreen(const NetworkStyle *networkStyle);
33
34protected:
35 void paintEvent(QPaintEvent *event) override;
36 void closeEvent(QCloseEvent *event) override;
37
38public Q_SLOTS:
41 void finish();
42
44 void showMessage(const QString &message, int alignment,
45 const QColor &color);
46
48 void handleLoadWallet();
49
50protected:
51 bool eventFilter(QObject *obj, QEvent *ev) override;
52
53private:
59 void shutdown();
60
65
67 bool m_shutdown = false;
68 std::unique_ptr<interfaces::Handler> m_handler_init_message;
69 std::unique_ptr<interfaces::Handler> m_handler_show_progress;
70 std::unique_ptr<interfaces::Handler> m_handler_load_wallet;
71 std::list<std::unique_ptr<interfaces::Wallet>> m_connected_wallets;
72 std::list<std::unique_ptr<interfaces::Handler>> m_connected_wallet_handlers;
73};
74
75#endif // BITCOIN_QT_SPLASHSCREEN_H
Class for the splashscreen with information of the running client.
void shutdown()
Initiate shutdown.
std::unique_ptr< interfaces::Handler > m_handler_show_progress
void showMessage(const QString &message, int alignment, const QColor &color)
Show message and progress.
void unsubscribeFromCoreSignals()
Disconnect core signals to splash screen.
std::list< std::unique_ptr< interfaces::Wallet > > m_connected_wallets
void subscribeToCoreSignals()
Connect core signals to splash screen.
void finish()
Hide the splash screen window and schedule the splash screen object for deletion.
QColor curColor
std::list< std::unique_ptr< interfaces::Handler > > m_connected_wallet_handlers
std::unique_ptr< interfaces::Handler > m_handler_init_message
void paintEvent(QPaintEvent *event) override
void closeEvent(QCloseEvent *event) override
void handleLoadWallet()
Handle wallet load notifications.
QString curMessage
void setNode(interfaces::Node &node)
QPixmap pixmap
bool eventFilter(QObject *obj, QEvent *ev) override
std::unique_ptr< interfaces::Handler > m_handler_load_wallet
interfaces::Node * m_node
Top-level interface for a bitcoin node (bitcoind process).
Definition node.h:59
Definition init.h:28
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85