Skip to content

Commit

Permalink
qml: Update and Add UI Snapshot settings
Browse files Browse the repository at this point in the history
  • Loading branch information
D33r-Gee committed Sep 27, 2024
1 parent 54d1049 commit f016406
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/qml/pages/settings/SettingsConnection.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Item {
property alias navMiddleDetail: connectionSwipe.navMiddleDetail
property alias navLeftDetail: connectionSwipe.navLeftDetail
property alias showHeader: connectionSwipe.showHeader

function setSnapshotImported(imported) {
connection_settings.loadedDetailItem.setSnapshotImported(imported)
}

SwipeView {
id: connectionSwipe
property alias navRightDetail: connection_settings.navRightDetail
Expand All @@ -21,6 +26,10 @@ Item {
property alias showHeader: connection_settings.showHeader
anchors.fill: parent
interactive: false
property double snapshotVerificationProgress: 0.0
property int snapshotVerificationCycles: 0
property bool snapshotVerified: false
property real progress: 0
orientation: Qt.Horizontal
InformationPage {
id: connection_settings
Expand All @@ -38,5 +47,29 @@ Item {
connectionSwipe.decrementCurrentIndex()
}
}
SettingsSnapshot {
onBackClicked: {
connectionSwipe.decrementCurrentIndex()
connectionSwipe.decrementCurrentIndex()
}
}
SettingsProgressBar {
onBackClicked: {
connectionSwipe.decrementCurrentIndex()
connectionSwipe.decrementCurrentIndex()
connectionSwipe.decrementCurrentIndex()
}
}
SettingsLoadedSnapshot {
onSnapshotImportCompleted: {
setSnapshotImported(true)
}
onBackClicked: {
connectionSwipe.decrementCurrentIndex()
connectionSwipe.decrementCurrentIndex()
connectionSwipe.decrementCurrentIndex()
connectionSwipe.decrementCurrentIndex()
}
}
}
}
38 changes: 38 additions & 0 deletions src/qml/pages/settings/SettingsLoadedSnapshot.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright (c) 2024-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import "../../controls"
import "../../components"

Page {
signal backClicked
signal continueClicked
signal snapshotImportCompleted

id: root

background: null
implicitWidth: 450
leftPadding: 20
rightPadding: 20
topPadding: 30

header: NavigationBar2 {
leftItem: NavButton {
iconSource: "image://images/caret-left"
text: qsTr("Back")
onClicked: root.backClicked()
}
}
LoadedSnapshotSettings {
width: Math.min(parent.width, 450)
anchors.horizontalCenter: parent.horizontalCenter
onSnapshotImportCompleted: {
root.snapshotImportCompleted()
}
}
}
35 changes: 35 additions & 0 deletions src/qml/pages/settings/SettingsProgressBar.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (c) 2024-present resent The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15

import "../../controls"
import "../../components"

Page {
signal backClicked
signal continueClicked

id: root

background: null
implicitWidth: 450
leftPadding: 20
rightPadding: 20
topPadding: 30

header: NavigationBar2 {
leftItem: NavButton {
iconSource: "image://images/caret-left"
text: qsTr("Back")
onClicked: root.backClicked()
}
}
ProgressBarSettings {
width: Math.min(parent.width, 450)
anchors.horizontalCenter: parent.horizontalCenter
}
}
33 changes: 33 additions & 0 deletions src/qml/pages/settings/SettingsSnapshot.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright (c) 2024-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import "../../controls"
import "../../components"

Page {
signal backClicked

id: root

background: null
implicitWidth: 450
leftPadding: 20
rightPadding: 20
topPadding: 30

header: NavigationBar2 {
leftItem: NavButton {
iconSource: "image://images/caret-left"
text: qsTr("Back")
onClicked: root.backClicked()
}
}
SnapshotSettings {
width: Math.min(parent.width, 450)
anchors.horizontalCenter: parent.horizontalCenter
}
}

0 comments on commit f016406

Please sign in to comment.