diff options
Diffstat (limited to 'jetting-interface/Main.qml')
| -rw-r--r-- | jetting-interface/Main.qml | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/jetting-interface/Main.qml b/jetting-interface/Main.qml index 1c7b553..cd69ed8 100644 --- a/jetting-interface/Main.qml +++ b/jetting-interface/Main.qml @@ -31,9 +31,8 @@ ApplicationWindow { Connections { function onConnectedChanged() { - debugConsole.appendLog(Xpl2Client.connected - ? "Controller connected" : - "Controller disconnected"); + debugConsole.appendLog(Xpl2Client.connected ? "Connected to proxy" : + "Disconnected from proxy"); } function onErrorOccurred(error: string) { @@ -44,12 +43,6 @@ ApplicationWindow { statusPage.lastJcStatus = status; } - function onListeningChanged() { - debugConsole.appendLog(Xpl2Client.listening - ? "Listening on ports 9110/9111/9112" : - "Stopped listening"); - } - function onPhStatusReceived(status) { statusPage.lastPhStatus = status; } @@ -101,9 +94,25 @@ ApplicationWindow { RowLayout { anchors.fill: parent + TextField { + Layout.preferredWidth: 140 + placeholderText: "Host" + text: Xpl2Client.host + + onEditingFinished: Xpl2Client.host = text + } + + TextField { + Layout.preferredWidth: 70 + placeholderText: "Port" + text: Xpl2Client.commandPort + + onEditingFinished: Xpl2Client.commandPort = parseInt(text) + } + Label { - text: Xpl2Client.connected ? "Controller connected" : - "Waiting for controller…" + text: Xpl2Client.connected ? "Connected to proxy" : + "Disconnected" } Item { @@ -111,13 +120,13 @@ ApplicationWindow { } Button { - text: Xpl2Client.listening ? "Stop" : "Listen" + text: Xpl2Client.connected ? "Disconnect" : "Connect" onClicked: { - if (Xpl2Client.listening) - Xpl2Client.stopListening(); + if (Xpl2Client.connected) + Xpl2Client.disconnectFromProxy(); else - Xpl2Client.startListening(); + Xpl2Client.connectToProxy(); } } } |
