aboutsummaryrefslogtreecommitdiff
path: root/src/qt/splashscreen.h
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2017-06-23 09:32:38 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2017-06-29 17:48:08 +0200
commit00cb69bc8655b1c17064a7e42453fd049e555076 (patch)
treee6b4f5be586f06f073c5a35e30f18e4e845f066d /src/qt/splashscreen.h
parent90a002ea647dcea57a2ed4294eab77897168ba1d (diff)
[Qt] allow to execute a callback during splashscreen progress
Diffstat (limited to 'src/qt/splashscreen.h')
-rw-r--r--src/qt/splashscreen.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/splashscreen.h b/src/qt/splashscreen.h
index 95a65cc53c..a88ebb98a8 100644
--- a/src/qt/splashscreen.h
+++ b/src/qt/splashscreen.h
@@ -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