mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
[Qt] allow to execute a callback during splashscreen progress
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#ifndef BITCOIN_QT_SPLASHSCREEN_H
|
||||
#define BITCOIN_QT_SPLASHSCREEN_H
|
||||
|
||||
#include <functional>
|
||||
#include <QSplashScreen>
|
||||
|
||||
class CWallet;
|
||||
@@ -35,6 +36,11 @@ public Q_SLOTS:
|
||||
/** Show message and progress */
|
||||
void showMessage(const QString &message, int alignment, const QColor &color);
|
||||
|
||||
/** Sets the break action */
|
||||
void setBreakAction(const std::function<void(void)> &action);
|
||||
protected:
|
||||
bool eventFilter(QObject * obj, QEvent * ev);
|
||||
|
||||
private:
|
||||
/** Connect core signals to splash screen */
|
||||
void subscribeToCoreSignals();
|
||||
@@ -49,6 +55,8 @@ private:
|
||||
int curAlignment;
|
||||
|
||||
QList<CWallet*> connectedWallets;
|
||||
|
||||
std::function<void(void)> breakAction;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_SPLASHSCREEN_H
|
||||
|
||||
Reference in New Issue
Block a user