PIVX Core  5.6.99
P2P Digital Currency
splash.h
Go to the documentation of this file.
1 // Copyright (c) 2019-2020 The PIVX Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef PIVX_QT_SPLASH_H
6 #define PIVX_QT_SPLASH_H
7 
8 #include <QWidget>
9 
10 #include <memory>
11 
12 class NetworkStyle;
13 
14 namespace interfaces {
15  class Handler;
16 };
17 
18 namespace Ui {
19 class Splash;
20 }
21 
22 class Splash : public QWidget
23 {
24  Q_OBJECT
25 
26 public:
27  explicit Splash(const NetworkStyle* networkStyle);
28  ~Splash();
29 
30 public Q_SLOTS:
32  void slotFinish(QWidget* mainWin);
33 
35  void showMessage(const QString& message, int alignment, const QColor& color);
36 
37 protected:
38  void closeEvent(QCloseEvent* event);
39 
40 private:
41  Ui::Splash *ui;
42 
43  // Listeners
44  std::unique_ptr<interfaces::Handler> m_handler_init_message;
45  std::unique_ptr<interfaces::Handler> m_handler_show_progress;
46  std::unique_ptr<interfaces::Handler> m_handler_load_wallet;
47 
52 };
53 
54 #endif // PIVX_QT_SPLASH_H
Definition: splash.h:23
void showMessage(const QString &message, int alignment, const QColor &color)
Show message and progress.
Definition: splash.cpp:109
void slotFinish(QWidget *mainWin)
Slot to call finish() method as it's not defined as slot.
Definition: splash.cpp:66
void closeEvent(QCloseEvent *event)
Definition: splash.cpp:113
std::unique_ptr< interfaces::Handler > m_handler_show_progress
Definition: splash.h:45
void subscribeToCoreSignals()
Connect core signals to splash screen.
Definition: splash.cpp:90
void unsubscribeFromCoreSignals()
Disconnect core signals to splash screen.
Definition: splash.cpp:99
~Splash()
Definition: splash.cpp:61
Ui::Splash * ui
Definition: splash.h:41
std::unique_ptr< interfaces::Handler > m_handler_init_message
Definition: splash.h:44
Splash(const NetworkStyle *networkStyle)
Definition: splash.cpp:31
std::unique_ptr< interfaces::Handler > m_handler_load_wallet
Definition: splash.h:46