[Qt] allow to execute a callback during splashscreen progress

This commit is contained in:
Jonas Schnelli
2017-06-23 09:32:38 +02:00
parent 90a002ea64
commit 00cb69bc86
4 changed files with 36 additions and 0 deletions

View File

@@ -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