53 lines
946 B
QML
53 lines
946 B
QML
import QtQuick
|
|
import QtQuick.Window
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QtCore
|
|
|
|
|
|
ApplicationWindow {
|
|
property int counter: 0
|
|
|
|
id: window
|
|
width: 640
|
|
height: 480
|
|
visible: true
|
|
title: "Magpie"
|
|
|
|
header: Label {
|
|
text: stack.currentItem.title
|
|
horizontalAlignment: Text.AlignHCenter
|
|
}
|
|
|
|
StackView {
|
|
id: stack
|
|
initialItem: welcome
|
|
anchors.fill: parent
|
|
}
|
|
|
|
Welcome {
|
|
id: welcome
|
|
serverAddress: settings.serverAddress
|
|
onPickServer: function (address) {
|
|
pick.address = address;
|
|
stack.push(pick)
|
|
}
|
|
}
|
|
|
|
Settings {
|
|
id: settings
|
|
|
|
property string serverAddress
|
|
}
|
|
|
|
ServerPick {
|
|
visible: false
|
|
id: pick
|
|
onBack: stack.pop()
|
|
onSuccess: function (address) {
|
|
settings.serverAddress = address;
|
|
stack.pop();
|
|
}
|
|
}
|
|
}
|