diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-23 14:55:32 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-23 14:55:32 +0100 |
| commit | 5ff9705937ffc1647587e1b228effd30c8a0e309 (patch) | |
| tree | e1c5d9397ebbd68dd593788d6b09688a1d6ee8bd /demo/DebugConsole.qml | |
| parent | 47096b375797c38b5b1e79f1366f1152cc292875 (diff) | |
| download | BobinkQtOpcUa-5ff9705937ffc1647587e1b228effd30c8a0e309.tar.gz BobinkQtOpcUa-5ff9705937ffc1647587e1b228effd30c8a0e309.zip | |
Refactor Main.qml into separate components and add comments
Extract ConnectionPage, CertTrustDialog, and DebugConsole from Main.qml
into their own QML files. Add inline comments to
OpcUaMonitoredNode::handleValueUpdated explaining the range write guard,
value store, and timestamp update.
Diffstat (limited to 'demo/DebugConsole.qml')
| -rw-r--r-- | demo/DebugConsole.qml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/demo/DebugConsole.qml b/demo/DebugConsole.qml new file mode 100644 index 0000000..94202fb --- /dev/null +++ b/demo/DebugConsole.qml @@ -0,0 +1,34 @@ +// DebugConsole.qml — Timestamped log output panel. + +import QtQuick +import QtQuick.Controls + +Rectangle { + id: debugConsole + + function appendLog(msg) { + let ts = new Date().toLocaleTimeString(Qt.locale(), "HH:mm:ss"); + debugLog.text += "[" + ts + "] " + msg + "\n"; + debugLog.cursorPosition = debugLog.text.length; + } + + border.color: "#444" + color: "#1e1e1e" + radius: 4 + + ScrollView { + anchors.fill: parent + anchors.margins: 4 + + TextArea { + id: debugLog + + background: null + color: "#cccccc" + font.family: "monospace" + font.pointSize: 9 + readOnly: true + wrapMode: TextEdit.Wrap + } + } +} |
