mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-14 23:47:09 +00:00
2c987d2912
* french translation * Update main.cpp * Update main.cpp Co-authored-by: watchha <watchha@users.noreply.github.com>
57 lines
1.2 KiB
QML
57 lines
1.2 KiB
QML
import QtQuick 2.0
|
|
import QtQuick.Controls 2.2
|
|
|
|
import ComputerManager 1.0
|
|
import Session 1.0
|
|
|
|
Item {
|
|
function onSearchingComputer() {
|
|
stageLabel.text = qsTr("Establishing connection to PC...")
|
|
}
|
|
|
|
function onQuittingApp() {
|
|
stageLabel.text = qsTr("Quitting app...")
|
|
}
|
|
|
|
function onFailure(message) {
|
|
errorDialog.text = message
|
|
errorDialog.open()
|
|
}
|
|
|
|
StackView.onActivated: {
|
|
if (!launcher.isExecuted()) {
|
|
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
|
|
}
|
|
}
|
|
|
|
ErrorMessageDialog {
|
|
id: errorDialog
|
|
|
|
onClosed: {
|
|
Qt.quit()
|
|
}
|
|
}
|
|
}
|