5#include <bitcoin-build-config.h>
21#include <QApplication>
24#include <QRadialGradient>
108 if(!titleAddText.isEmpty()) {
126 move(QGuiApplication::primaryScreen()->
geometry().
center() - r.center());
153 if (ev->type() == QEvent::KeyPress) {
159 return QObject::eventFilter(
obj, ev);
164 bool invoked = QMetaObject::invokeMethod(
splash,
"showMessage",
165 Qt::QueuedConnection,
167 Q_ARG(
int, Qt::AlignBottom|Qt::AlignHCenter),
176 : SplashScreen::tr(
"press q to shutdown").toStdString()) +
198 ShowProgress(this, title, nProgress, 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.
std::unique_ptr< interfaces::Handler > m_handler_init_wallet
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 std::unique_ptr< Handler > handleInitWallet(InitWalletFn fn)=0
virtual WalletLoader & walletLoader()=0
Get wallet loader.
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.
bool(* handler)(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)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.