Skip to content
Bitcoin Roots

v29.4-roots.2 · Commit 5: [PATCH 05/21] product: establish Roots identity and Qt experience

src/qt/wintaskbarprogress.h

Before: /dev/null · After: src/qt/wintaskbarprogress.h

File metadata
new file mode 100644
index 0000000000000000000000000000000000000000..cb848fe8fb85c6d5b94ac44b0921c0bf97177732

Download original patch · Release notes

Diff rows 1–47 of 47. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.

src/qt/wintaskbarprogress.h ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (c) 2025 The Bitcoin Roots 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_WINTASKBARPROGRESS_H
6
+ #define BITCOIN_QT_WINTASKBARPROGRESS_H
7
+
8
+ #include <QAbstractNativeEventFilter>
9
+ #include <QObject>
10
+ #include <QPointer>
11
+
12
+ class QWidget;
13
+ class QWindow;
14
+ struct ITaskbarList3;
15
+
16
+ class WinTaskbarProgress : public QObject, public QAbstractNativeEventFilter
17
+ {
18
+ Q_OBJECT
19
+
20
+ public:
21
+ explicit WinTaskbarProgress(QObject* parent = nullptr);
22
+ ~WinTaskbarProgress();
23
+
24
+ void setWindow(QWidget* widget);
25
+ void setValue(int value);
26
+ void setVisible(bool visible);
27
+
28
+ #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
29
+ bool nativeEventFilter(const QByteArray& event_type, void* message, qintptr* result) override;
30
+ #else
31
+ bool nativeEventFilter(const QByteArray& event_type, void* message, long* result) override;
32
+ #endif
33
+
34
+ private:
35
+ QPointer<QWindow> m_window;
36
+ int m_value{0};
37
+ bool m_visible{false};
38
+ ITaskbarList3* m_taskbar_button{nullptr};
39
+ unsigned int m_taskbar_button_created_msg{0};
40
+ bool m_taskbar_ready{false};
41
+
42
+ void updateProgress();
43
+ void initTaskbarButton();
44
+ void releaseTaskbarButton();
45
+ };
46
+
47
+ #endif // BITCOIN_QT_WINTASKBARPROGRESS_H