2018-12-06 02:45:28 +00:00
|
|
|
import QtQuick 2.0
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
|
|
|
|
import ComputerManager 1.0
|
|
|
|
import Session 1.0
|
|
|
|
|
|
|
|
Item {
|
|
|
|
function onSearchingComputer() {
|
2020-11-21 17:42:16 +00:00
|
|
|
stageLabel.text = qsTr("Establishing connection to PC...")
|
2018-12-06 02:45:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function onQuittingApp() {
|
2020-11-21 17:42:16 +00:00
|
|
|
stageLabel.text = qsTr("Quitting app...")
|
2018-12-06 02:45:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function onFailure(message) {
|
|
|
|
errorDialog.text = message
|
|
|
|
errorDialog.open()
|
|
|
|
}
|
|
|
|
|
2019-02-23 06:14:06 +00:00
|
|
|
StackView.onActivated: {
|
|
|
|
if (!launcher.isExecuted()) {
|
2018-12-06 02:45:28 +00:00
|
|
|
toolBar.visible = false
|
|
|
|
launcher.searchingComputer.connect(onSearchingComputer)
|
|
|
|
launcher.quittingApp.connect(onQuittingApp)
|
|
|
|
launcher.failed.connect(onFailure)
|
|
|
|
launcher.execute(ComputerManager)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Row {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
spacing: 5
|
|
|
|
|
|
|
|
BusyIndicator {
|
|
|
|
id: stageSpinner
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
id: stageLabel
|
|
|
|
height: stageSpinner.height
|
|
|
|
text: stageText
|
|
|
|
font.pointSize: 20
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-23 20:51:34 +00:00
|
|
|
ErrorMessageDialog {
|
2018-12-06 02:45:28 +00:00
|
|
|
id: errorDialog
|
2019-03-23 20:51:34 +00:00
|
|
|
|
2019-04-01 00:44:19 +00:00
|
|
|
onClosed: {
|
|
|
|
Qt.quit()
|
2018-12-06 02:45:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|