aboutsummaryrefslogtreecommitdiff
path: root/src/qt/splashscreen.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/splashscreen.h')
-rw-r--r--src/qt/splashscreen.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/qt/splashscreen.h b/src/qt/splashscreen.h
index d79038d81d..89c21e6457 100644
--- a/src/qt/splashscreen.h
+++ b/src/qt/splashscreen.h
@@ -7,25 +7,41 @@
#include <QSplashScreen>
-/** class for the splashscreen with information of the running client
+/** Class for the splashscreen with information of the running client.
+ *
+ * @note this is intentionally not a QSplashScreen. Bitcoin Core initialization
+ * can take a long time, and in that case a progress window that cannot be
+ * moved around and minimized has turned out to be frustrating to the user.
*/
-class SplashScreen : public QSplashScreen
+class SplashScreen : public QWidget
{
Q_OBJECT
public:
- explicit SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f, bool isTestNet);
+ explicit SplashScreen(Qt::WindowFlags f, bool isTestNet);
~SplashScreen();
+protected:
+ void paintEvent(QPaintEvent *event);
+ void closeEvent(QCloseEvent *event);
+
public slots:
/** Slot to call finish() method as it's not defined as slot */
void slotFinish(QWidget *mainWin);
+ /** Show message and progress */
+ void showMessage(const QString &message, int alignment, const QColor &color);
+
private:
/** Connect core signals to splash screen */
void subscribeToCoreSignals();
/** Disconnect core signals to splash screen */
void unsubscribeFromCoreSignals();
+
+ QPixmap pixmap;
+ QString curMessage;
+ QColor curColor;
+ int curAlignment;
};
#endif // SPLASHSCREEN_H