5#if defined(HAVE_CONFIG_H)
6#include <config/bitcoin-config.h>
23#include <QApplication>
26#include <QRadialGradient>
30 : QWidget(
nullptr), curAlignment(0) {
117 Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap,
122 if (!titleAddText.isEmpty()) {
173 if (ev->type() == QEvent::KeyPress) {
179 return QObject::eventFilter(
obj, ev);
194 bool invoked = QMetaObject::invokeMethod(
195 splash,
"showMessage", Qt::QueuedConnection,
197 Q_ARG(
int, Qt::AlignBottom | Qt::AlignHCenter),
206 title + std::string(
"\n") +
208 ?
_(
"(press q to shutdown and continue later)").translated
216 std::bind(
InitMessage,
this, std::placeholders::_1));
219 std::placeholders::_2, std::placeholders::_3));
228 [
this](std::unique_ptr<interfaces::Wallet>
wallet) {
231 std::placeholders::_2,
false)));
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.
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.
void setNode(interfaces::Node &node)
bool eventFilter(QObject *obj, QEvent *ev) override
SplashScreen(const NetworkStyle *networkStyle)
std::unique_ptr< interfaces::Handler > m_handler_load_wallet
interfaces::Node * m_node
static bool isWalletEnabled()
Top-level interface for a bitcoin node (bitcoind process).
virtual std::unique_ptr< Handler > handleInitMessage(InitMessageFn fn)=0
virtual std::unique_ptr< Handler > handleShowProgress(ShowProgressFn fn)=0
virtual void startShutdown()=0
Start shutdown.
virtual WalletClient & walletClient()=0
Get wallet client.
virtual std::unique_ptr< Handler > handleLoadWallet(LoadWalletFn fn)=0
std::string CopyrightHolders(const std::string &strPrefix)
std::string FormatFullVersion()
void handleCloseWindowShortcut(QWidget *w)
int TextWidth(const QFontMetrics &fm, const QString &text)
Returns the distance in pixels appropriate for drawing a subsequent character after text.
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...
bool(* handler)(Config &config, const std::any &context, HTTPRequest *req, const std::string &strReq)
static void ShowProgress(SplashScreen *splash, const std::string &title, int nProgress, bool resume_possible)
static void InitMessage(SplashScreen *splash, const std::string &message)
bilingual_str _(const char *psz)
Translation function.