Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/ied_simulator/qml/BrowserGoosePane.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import QtQuick.Layouts
Rectangle {
id: root
required property var theme
required property var client
required property var context
required property var engineering

property var visibleStreams: {
var all = engineering.gooseStreams
if (!client.iedName.length)
if (!context.iedName.length)
return all
var filtered = []
for (var index = 0; index < all.length; ++index) {
if (String(all[index].iedName) === client.iedName)
if (String(all[index].iedName) === context.iedName)
filtered.push(all[index])
}
return filtered
Expand Down
25 changes: 19 additions & 6 deletions apps/ied_simulator/qml/FileWorkspace.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Item {
required property var theme
required property var workspace
required property var hardening
required property var browserSession

property int viewIndex: 0

Expand Down Expand Up @@ -43,8 +44,10 @@ Item {
fileMode: FileDialog.OpenFile
nameFilters: ["IEC 61850 engineering files (*.scl *.cid *.scd *.iid *.icd)", "All files (*)"]
onAccepted: {
if (workspace.openFile(selectedFile))
if (workspace.openFile(selectedFile)) {
root.viewIndex = 1
root.browserRequested()
}
}
}

Expand Down Expand Up @@ -104,7 +107,7 @@ Item {
theme: root.theme
text: "Open SCL"
primary: !workspace.loaded
enabled: !workspace.busy
enabled: !workspace.busy && !browserSession.configurationLocked
onClicked: openDialog.open()
}

Expand Down Expand Up @@ -173,13 +176,19 @@ Item {
Label { text: "Engineering file"; color: root.theme.text; font.pixelSize: 10; font.weight: Font.DemiBold }
Label {
Layout.fillWidth: true
text: "Open SCL / CID / SCD / IID / ICD without changing protocol runtime."
text: "Open SCL / CID / SCD / IID / ICD and continue in the unified IED Browser."
color: root.theme.muted
font.pixelSize: 8
wrapMode: Text.WordWrap
}
Item { Layout.fillHeight: true }
ActionButton { theme: root.theme; text: "Open SCL"; primary: true; onClicked: openDialog.open() }
ActionButton {
theme: root.theme
text: "Open SCL"
primary: true
enabled: !workspace.busy && !browserSession.configurationLocked
onClicked: openDialog.open()
}
}
}

Expand Down Expand Up @@ -346,10 +355,14 @@ Item {
id: resourceMouse
anchors.fill: parent
hoverEnabled: true
enabled: hardening.recentResourceExists(index) && !workspace.busy
enabled: hardening.recentResourceExists(index)
&& !workspace.busy
&& !browserSession.configurationLocked
onClicked: {
if (workspace.openFile(hardening.recentResourceUrl(index)))
if (workspace.openFile(hardening.recentResourceUrl(index))) {
root.viewIndex = 1
root.browserRequested()
}
}
}
}
Expand Down
29 changes: 16 additions & 13 deletions apps/ied_simulator/qml/IedBrowserNavigation.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Rectangle {
required property var theme
required property var session
required property var client
required property var context
required property var reports
required property var utilities
required property var engineering
Expand All @@ -28,11 +29,11 @@ Rectangle {

function configuredGooseCount() {
var streams = engineering.gooseStreams
if (!client.iedName.length)
if (!context.iedName.length)
return streams.length
var count = 0
for (var index = 0; index < streams.length; ++index) {
if (String(streams[index].iedName) === client.iedName)
if (String(streams[index].iedName) === context.iedName)
++count
}
return count
Expand Down Expand Up @@ -213,7 +214,8 @@ Rectangle {
NavButton {
targetSection: 3
title: "Setting Groups"
countText: utilities.connected ? String(utilities.settingGroupCount) : ""
countText: utilities.connected ? String(utilities.settingGroupCount)
: context.loaded ? String(context.settingGroupCount) : ""
}

Loader {
Expand Down Expand Up @@ -267,7 +269,8 @@ Rectangle {
NavButton {
targetSection: 1
title: "DataSets"
countText: reports.connected ? String(reports.dataSets.length) : ""
countText: reports.connected ? String(reports.dataSets.length)
: context.loaded ? String(context.dataSetCount) : ""
}

Loader {
Expand Down Expand Up @@ -322,7 +325,7 @@ Rectangle {
NavButton {
targetSection: 0
title: "Data Model"
countText: client.connected ? String(client.treeModel.totalNodeCount) : ""
countText: context.loaded ? String(context.treeModel.totalNodeCount) : ""
}

ColumnLayout {
Expand All @@ -338,15 +341,15 @@ Rectangle {
Layout.topMargin: 5
Layout.bottomMargin: 5
placeholderText: "Filter model"
enabled: client.connected
enabled: context.loaded
onTextChanged: searchDebounce.restart()
}

Timer {
id: searchDebounce
interval: 100
repeat: false
onTriggered: client.treeModel.filterText = modelSearch.text
onTriggered: context.treeModel.filterText = modelSearch.text
}

ListView {
Expand All @@ -356,7 +359,7 @@ Rectangle {
clip: true
reuseItems: true
cacheBuffer: 0
model: client.treeModel
model: context.treeModel
ScrollBar.vertical: ScrollBar {}

delegate: Rectangle {
Expand Down Expand Up @@ -408,16 +411,16 @@ Rectangle {
anchors.fill: parent
hoverEnabled: true
onClicked: function(event) {
client.treeModel.selectRow(index)
context.treeModel.selectRow(index)
if (model.hasChildren && event.x < 44 + model.depth * 12)
client.treeModel.toggle(index)
context.treeModel.toggle(index)
root.choose(0, "Data Model")
}
onDoubleClicked: {
if (model.hasChildren)
client.treeModel.toggle(index)
else
client.readSelected()
context.treeModel.toggle(index)
else if (client.connected)
client.readEngineeringSelected()
}
}
}
Expand Down
Loading
Loading