peerplays_migrated/programs/light_client/qml/main.qml

65 lines
1.3 KiB
QML
Raw Normal View History

2015-07-10 21:37:22 +00:00
import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2
import Qt.labs.settings 1.0
2015-07-10 21:37:22 +00:00
import Graphene.Client 0.1
ApplicationWindow {
id: window
2015-07-10 21:37:22 +00:00
visible: true
width: 640
height: 480
title: qsTr("Hello World")
Component.onCompleted: {
app.start("ws://localhost:8090", "user", "pass")
}
2015-07-10 21:37:22 +00:00
menuBar: MenuBar {
Menu {
title: qsTr("File")
MenuItem {
text: qsTr("&Open")
onTriggered: console.log("Open action triggered");
}
MenuItem {
text: qsTr("Exit")
onTriggered: Qt.quit();
}
}
}
2015-07-13 17:19:07 +00:00
GrapheneApplication {
id: app
2015-07-10 21:37:22 +00:00
}
Settings {
id: appSettings
category: "appSettings"
2015-07-10 21:37:22 +00:00
}
2015-07-13 18:16:02 +00:00
Button {
text: "Transfer"
anchors.centerIn: parent
2015-07-13 18:16:02 +00:00
onClicked: formBox.showForm(Qt.createComponent("TransferForm.qml"), function() {
console.log("Closed form")
})
}
FormBox {
id: formBox
anchors.fill: parent
z: 10
}
2015-07-10 21:37:22 +00:00
// This Settings is only for geometry -- it doesn't get an id. See appSettings for normal settings
Settings {
category: "windowGeometry"
property alias x: window.x
property alias y: window.y
property alias width: window.width
property alias height: window.height
2015-07-10 21:37:22 +00:00
}
}