Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

modaloverlay.h
Go to the documentation of this file.
1 // Copyright (c) 2016 The Bitcoin 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 BITCOIN_QT_MODALOVERLAY_H
6 #define BITCOIN_QT_MODALOVERLAY_H
7 
8 #include <QDateTime>
9 #include <QWidget>
10 
12 static constexpr int HEADER_HEIGHT_DELTA_SYNC = 24;
13 
14 namespace Ui {
15  class ModalOverlay;
16 }
17 
19 class ModalOverlay : public QWidget
20 {
21  Q_OBJECT
22 
23 public:
24  explicit ModalOverlay(QWidget *parent);
25  ~ModalOverlay();
26 
27 public Q_SLOTS:
28  void tipUpdate(int count, const QDateTime& blockDate, double nVerificationProgress);
29  void setKnownBestHeight(int count, const QDateTime& blockDate);
30 
31  void toggleVisibility();
32  // will show or hide the modal layer
33  void showHide(bool hide = false, bool userRequested = false);
34  void closeClicked();
35  void hideForever();
36  bool isLayerVisible() const { return layerIsVisible; }
37 
38 protected:
39  bool eventFilter(QObject * obj, QEvent * ev);
40  bool event(QEvent* ev);
41 
42 private:
43  Ui::ModalOverlay *ui;
44  int bestHeaderHeight; //best known height (based on the headers)
45  QDateTime bestHeaderDate;
46  QVector<QPair<qint64, double> > blockProcessTime;
48  bool userClosed;
50 };
51 
52 #endif // BITCOIN_QT_MODALOVERLAY_H
ModalOverlay(QWidget *parent)
bool event(QEvent *ev)
Tracks parent widget changes.
static constexpr int HEADER_HEIGHT_DELTA_SYNC
The required delta of headers to the estimated number of available headers until we show the IBD prog...
Definition: modaloverlay.h:12
bool eventFilter(QObject *obj, QEvent *ev)
void tipUpdate(int count, const QDateTime &blockDate, double nVerificationProgress)
bool isLayerVisible() const
Definition: modaloverlay.h:36
Modal overlay to display information about the chain-sync state.
Definition: modaloverlay.h:19
Ui::ModalOverlay * ui
Definition: modaloverlay.h:43
bool foreverHidden
Definition: modaloverlay.h:49
void setKnownBestHeight(int count, const QDateTime &blockDate)
void toggleVisibility()
QDateTime bestHeaderDate
Definition: modaloverlay.h:45
bool layerIsVisible
Definition: modaloverlay.h:47
int bestHeaderHeight
Definition: modaloverlay.h:44
void showHide(bool hide=false, bool userRequested=false)
void hideForever()
static int count
Definition: tests.c:45
QVector< QPair< qint64, double > > blockProcessTime
Definition: modaloverlay.h:46
void closeClicked()
Released under the MIT license