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"
|
source: "../pages/icon-seaprint-nobg-bw.svg"
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Column {
|
||||||
id: label
|
width: parent.width
|
||||||
anchors.centerIn: parent
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
text: qsTr("SeaPrint")
|
Label {
|
||||||
|
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
|
ApplicationWindow
|
||||||
{
|
{
|
||||||
|
id: appWin
|
||||||
|
|
||||||
initialPage: Component { FirstPage { selectedFile: Qt.application.arguments[1] ? Qt.application.arguments[1] : "" } }
|
initialPage: Component { FirstPage { selectedFile: Qt.application.arguments[1] ? Qt.application.arguments[1] : "" } }
|
||||||
cover: Qt.resolvedUrl("cover/CoverPage.qml")
|
cover: Qt.resolvedUrl("cover/CoverPage.qml")
|
||||||
allowedOrientations: Orientation.All
|
allowedOrientations: Orientation.All
|
||||||
|
|
||||||
|
property string busyMessage: ""
|
||||||
|
property string progress: ""
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: db
|
id: db
|
||||||
property var db_conn
|
property var db_conn
|
||||||
|
|
|
@ -5,6 +5,10 @@ import "utils.js" as Utils
|
||||||
Page {
|
Page {
|
||||||
allowedOrientations: Orientation.All
|
allowedOrientations: Orientation.All
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
appWin.busyMessage = printer.busyMessage
|
||||||
|
}
|
||||||
|
|
||||||
property var printer
|
property var printer
|
||||||
backNavigation: false
|
backNavigation: false
|
||||||
Connections {
|
Connections {
|
||||||
|
@ -28,10 +32,22 @@ Page {
|
||||||
notifier.notify(qsTr("Print failed: ") + msg)
|
notifier.notify(qsTr("Print failed: ") + msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onBusyMessageChanged: {
|
||||||
|
appWin.busyMessage = printer.busyMessage
|
||||||
|
}
|
||||||
|
|
||||||
|
onProgressChanged: {
|
||||||
|
appWin.progress = printer.progress
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BusyLabel {
|
BusyLabel {
|
||||||
text: printer.busyMessage+"\n"+printer.progress;
|
text: printer.busyMessage+"\n"+printer.progress;
|
||||||
running: true
|
running: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onDestruction: {
|
||||||
|
appWin.busyMessage = ""
|
||||||
|
appWin.progress = ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue