Implemented terminal screen

This commit is contained in:
Yury Shuvakin
2022-08-25 09:19:00 +03:00
parent d1ba61acd8
commit 79518df613
6 changed files with 87 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import Controls 1.0 as Controls
import Cubo 1.0
ColumnLayout {
spacing: 20
Keys.onReturnPressed: sendButton.clicked()
Keys.onEnterPressed: sendButton.clicked()
Controls.Frame {
ScrollView {
anchors.fill: parent
Controls.TextArea {
id: outputArea
}
}
Layout.fillWidth: true
Layout.fillHeight: true
}
RowLayout {
spacing: 20
Controls.Button {
text: qsTr("Clear")
Layout.preferredWidth: 120
onClicked: outputArea.clear()
}
Controls.TextField {
id: commandField
implicitHeight: 52
Layout.fillWidth: true
}
Controls.Button {
id: sendButton
text: qsTr("Send")
Layout.preferredWidth: 120
onClicked: {
BmsInterface.commands().sendTerminalCmd(commandField.text)
commandField.clear()
}
}
Controls.Button {
text: qsTr("Help")
Layout.preferredWidth: 120
onClicked: BmsInterface.commands().sendTerminalCmd("help")
}
Layout.fillWidth: true
}
Connections {
target: BmsInterface.commands()
onPrintReceived: outputArea.append(str)
}
}

View File

@@ -4,3 +4,4 @@ AkbMonitorScreen 1.0 AkbMonitorScreen.qml
CellMonitorScreen 1.0 CellMonitorScreen.qml
BmsSettingsScreen 1.0 BmsSettingsScreen.qml
VisualizationScreen 1.0 VisualizationScreen.qml
BmsServiceScreen 1.0 BmsServiceScreen.qml