Put progress on the cover
This commit is contained in:
parent
3d08d137e2
commit
4fbfd0d5a2
3 changed files with 36 additions and 4 deletions
|
@ -10,9 +10,20 @@ CoverBackground {
|
|||
source: "../pages/icon-seaprint-nobg-bw.svg"
|
||||
}
|
||||
|
||||
Column {
|
||||
width: parent.width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Label {
|
||||
id: label
|
||||
anchors.centerIn: parent
|
||||
text: qsTr("SeaPrint")
|
||||
id: msgLabel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: appWin.busyMessage != "" ? appWin.busyMessage : qsTr("SeaPrint")
|
||||
}
|
||||
Label {
|
||||
id: progressLabel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: appWin.progress
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -7,10 +7,15 @@ import "pages"
|
|||
|
||||
ApplicationWindow
|
||||
{
|
||||
id: appWin
|
||||
|
||||
initialPage: Component { FirstPage { selectedFile: Qt.application.arguments[1] ? Qt.application.arguments[1] : "" } }
|
||||
cover: Qt.resolvedUrl("cover/CoverPage.qml")
|
||||
allowedOrientations: Orientation.All
|
||||
|
||||
property string busyMessage: ""
|
||||
property string progress: ""
|
||||
|
||||
Item {
|
||||
id: db
|
||||
property var db_conn
|
||||
|
|
|
@ -5,6 +5,10 @@ import "utils.js" as Utils
|
|||
Page {
|
||||
allowedOrientations: Orientation.All
|
||||
|
||||
Component.onCompleted: {
|
||||
appWin.busyMessage = printer.busyMessage
|
||||
}
|
||||
|
||||
property var printer
|
||||
backNavigation: false
|
||||
Connections {
|
||||
|
@ -28,10 +32,22 @@ Page {
|
|||
notifier.notify(qsTr("Print failed: ") + msg)
|
||||
}
|
||||
}
|
||||
onBusyMessageChanged: {
|
||||
appWin.busyMessage = printer.busyMessage
|
||||
}
|
||||
|
||||
onProgressChanged: {
|
||||
appWin.progress = printer.progress
|
||||
}
|
||||
}
|
||||
|
||||
BusyLabel {
|
||||
text: printer.busyMessage+"\n"+printer.progress;
|
||||
running: true
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
appWin.busyMessage = ""
|
||||
appWin.progress = ""
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue