Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1// Copyright (c) 2016-present The Bitcoin Core developers2// Distributed under the MIT software license, see the accompanying3// file COPYING or http://www.opensource.org/licenses/mit-license.php.5#ifndef BITCOIN_QT_MODALOVERLAY_H6#define BITCOIN_QT_MODALOVERLAY_H8#include <QDateTime>9#include <QPropertyAnimation>10#include <QWidget>12//! The required delta of headers to the estimated number of available headers until we show the IBD progress13inline constexpr int HEADER_HEIGHT_DELTA_SYNC = 24;15namespace Ui {16class ModalOverlay;17}19/** Modal overlay to display information about the chain-sync state */20class ModalOverlay : public QWidget21{22Q_OBJECT24public:25explicit ModalOverlay(bool enable_wallet, QWidget *parent);26~ModalOverlay();28void tipUpdate(int count, const QDateTime& blockDate, double nVerificationProgress);29void setKnownBestHeight(int count, const QDateTime& blockDate, bool presync);31// will show or hide the modal layer32void showHide(bool hide = false, bool userRequested = false);33bool isLayerVisible() const { return layerIsVisible; }35public Q_SLOTS:36void toggleVisibility();37void closeClicked();39Q_SIGNALS:40void triggered(bool hidden);42protected:43bool eventFilter(QObject * obj, QEvent * ev) override;44bool event(QEvent* ev) override;46private:47Ui::ModalOverlay *ui;48int bestHeaderHeight{0}; // best known height (based on the headers)49QDateTime bestHeaderDate;50QVector<QPair<qint64, double> > blockProcessTime;51bool layerIsVisible{false};52bool userClosed{false};53QPropertyAnimation m_animation;54void UpdateHeaderSyncLabel();55void UpdateHeaderPresyncLabel(int height, const QDateTime& blockDate);56};58#endif // BITCOIN_QT_MODALOVERLAY_H
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.