aboutsummaryrefslogtreecommitdiffstats
path: root/demo/Main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'demo/Main.qml')
-rw-r--r--demo/Main.qml23
1 files changed, 16 insertions, 7 deletions
diff --git a/demo/Main.qml b/demo/Main.qml
index 2cfa577..48af74a 100644
--- a/demo/Main.qml
+++ b/demo/Main.qml
@@ -1,5 +1,6 @@
// Main.qml — Demo app for Bobink library.
// Connects to an OPC UA server, then pushes NodePage for node interaction.
+pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Controls
@@ -31,8 +32,7 @@ ApplicationWindow {
Bobink.stopDiscovery();
stack.push("NodePage.qml", {
stackRef: stack,
- pageNumber: 1,
- logFunction: debugConsole.appendLog
+ pageNumber: 1
});
} else {
stack.pop(null);
@@ -163,7 +163,7 @@ ApplicationWindow {
Bobink.stopDiscovery();
} else {
Bobink.discoveryUrl
- = discoveryUrlField.text;
+ = discoveryUrlField.text;
Bobink.startDiscovery();
}
}
@@ -216,8 +216,8 @@ ApplicationWindow {
onClicked: {
if (modelData.discoveryUrls.length > 0)
- serverUrlField.text
- = modelData.discoveryUrls[0];
+ serverUrlField.text
+ = modelData.discoveryUrls[0];
}
}
}
@@ -473,8 +473,8 @@ ApplicationWindow {
Bobink.auth = auth;
Bobink.serverUrl = serverUrlField.text;
Bobink.connectDirect(
- securityPolicyCombo.currentValue,
- securityModeCombo.currentValue);
+ securityPolicyCombo.currentValue,
+ securityModeCombo.currentValue);
}
}
@@ -483,6 +483,15 @@ ApplicationWindow {
}
}
}
+
+ Connections {
+ function onLogRequested(message) {
+ debugConsole.appendLog(message);
+ }
+
+ ignoreUnknownSignals: true
+ target: stack.currentItem
+ }
}
Rectangle {