1 // Copyright (c) 2016-2017 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.
5 #ifndef BITCOIN_QT_MODALOVERLAY_H
6 #define BITCOIN_QT_MODALOVERLAY_H
11 //! The required delta of headers to the estimated number of available headers until we show the IBD progress
12 static constexpr int HEADER_HEIGHT_DELTA_SYNC
= 24;
18 /** Modal overlay to display information about the chain-sync state */
19 class ModalOverlay
: public QWidget
24 explicit ModalOverlay(QWidget
*parent
);
28 void tipUpdate(int count
, const QDateTime
& blockDate
, double nVerificationProgress
);
29 void setKnownBestHeight(int count
, const QDateTime
& blockDate
);
31 void toggleVisibility();
32 // will show or hide the modal layer
33 void showHide(bool hide
= false, bool userRequested
= false);
35 bool isLayerVisible() const { return layerIsVisible
; }
38 bool eventFilter(QObject
* obj
, QEvent
* ev
);
39 bool event(QEvent
* ev
);
43 int bestHeaderHeight
; //best known height (based on the headers)
44 QDateTime bestHeaderDate
;
45 QVector
<QPair
<qint64
, double> > blockProcessTime
;
50 #endif // BITCOIN_QT_MODALOVERLAY_H