Skip to content

Commit a1193fc

Browse files
committed
qml: Update and Add UI Snapshot settings
1 parent 6a7c082 commit a1193fc

File tree

4 files changed

+139
-0
lines changed

4 files changed

+139
-0
lines changed

src/qml/pages/settings/SettingsConnection.qml

+33
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ Item {
1313
property alias navMiddleDetail: connectionSwipe.navMiddleDetail
1414
property alias navLeftDetail: connectionSwipe.navLeftDetail
1515
property alias showHeader: connectionSwipe.showHeader
16+
17+
function setSnapshotImported(imported) {
18+
connection_settings.loadedDetailItem.setSnapshotImported(imported)
19+
}
20+
1621
SwipeView {
1722
id: connectionSwipe
1823
property alias navRightDetail: connection_settings.navRightDetail
@@ -21,6 +26,10 @@ Item {
2126
property alias showHeader: connection_settings.showHeader
2227
anchors.fill: parent
2328
interactive: false
29+
property double snapshotVerificationProgress: 0.0
30+
property int snapshotVerificationCycles: 0
31+
property bool snapshotVerified: false
32+
property real progress: 0
2433
orientation: Qt.Horizontal
2534
InformationPage {
2635
id: connection_settings
@@ -38,5 +47,29 @@ Item {
3847
connectionSwipe.decrementCurrentIndex()
3948
}
4049
}
50+
SettingsSnapshot {
51+
onBackClicked: {
52+
connectionSwipe.decrementCurrentIndex()
53+
connectionSwipe.decrementCurrentIndex()
54+
}
55+
}
56+
SettingsProgressBar {
57+
onBackClicked: {
58+
connectionSwipe.decrementCurrentIndex()
59+
connectionSwipe.decrementCurrentIndex()
60+
connectionSwipe.decrementCurrentIndex()
61+
}
62+
}
63+
SettingsLoadedSnapshot {
64+
onSnapshotImportCompleted: {
65+
setSnapshotImported(true)
66+
}
67+
onBackClicked: {
68+
connectionSwipe.decrementCurrentIndex()
69+
connectionSwipe.decrementCurrentIndex()
70+
connectionSwipe.decrementCurrentIndex()
71+
connectionSwipe.decrementCurrentIndex()
72+
}
73+
}
4174
}
4275
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Copyright (c) 2024-present 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+
import QtQuick 2.15
6+
import QtQuick.Controls 2.15
7+
import QtQuick.Layouts 1.15
8+
import "../../controls"
9+
import "../../components"
10+
11+
Page {
12+
signal backClicked
13+
signal continueClicked
14+
signal snapshotImportCompleted
15+
16+
id: root
17+
18+
background: null
19+
implicitWidth: 450
20+
leftPadding: 20
21+
rightPadding: 20
22+
topPadding: 30
23+
24+
header: NavigationBar2 {
25+
leftItem: NavButton {
26+
iconSource: "image://images/caret-left"
27+
text: qsTr("Back")
28+
onClicked: root.backClicked()
29+
}
30+
}
31+
LoadedSnapshotSettings {
32+
width: Math.min(parent.width, 450)
33+
anchors.horizontalCenter: parent.horizontalCenter
34+
onSnapshotImportCompleted: {
35+
root.snapshotImportCompleted()
36+
}
37+
}
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright (c) 2024-present resent 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+
import QtQuick 2.15
6+
import QtQuick.Controls 2.15
7+
import QtQuick.Layouts 1.15
8+
9+
import "../../controls"
10+
import "../../components"
11+
12+
Page {
13+
signal backClicked
14+
signal continueClicked
15+
16+
id: root
17+
18+
background: null
19+
implicitWidth: 450
20+
leftPadding: 20
21+
rightPadding: 20
22+
topPadding: 30
23+
24+
header: NavigationBar2 {
25+
leftItem: NavButton {
26+
iconSource: "image://images/caret-left"
27+
text: qsTr("Back")
28+
onClicked: root.backClicked()
29+
}
30+
}
31+
ProgressBarSettings {
32+
width: Math.min(parent.width, 450)
33+
anchors.horizontalCenter: parent.horizontalCenter
34+
}
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Copyright (c) 2024-present 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+
import QtQuick 2.15
6+
import QtQuick.Controls 2.15
7+
import QtQuick.Layouts 1.15
8+
import "../../controls"
9+
import "../../components"
10+
11+
Page {
12+
signal backClicked
13+
14+
id: root
15+
16+
background: null
17+
implicitWidth: 450
18+
leftPadding: 20
19+
rightPadding: 20
20+
topPadding: 30
21+
22+
header: NavigationBar2 {
23+
leftItem: NavButton {
24+
iconSource: "image://images/caret-left"
25+
text: qsTr("Back")
26+
onClicked: root.backClicked()
27+
}
28+
}
29+
SnapshotSettings {
30+
width: Math.min(parent.width, 450)
31+
anchors.horizontalCenter: parent.horizontalCenter
32+
}
33+
}

0 commit comments

Comments
 (0)