Added a button to update the list of ports. Changed the colors of the lines on the charts. Added translations for qt libraries
This commit is contained in:
@@ -32,15 +32,31 @@ Dialog {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
Label {
|
||||
Controls.SubtitleLabel {
|
||||
text: qsTr("Select serial port")
|
||||
maximumLineCount: 2
|
||||
wrapMode: Text.Wrap
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
}
|
||||
|
||||
Controls.ComboBox {
|
||||
id: serialBox
|
||||
model: BmsInterface.serialPortNames()
|
||||
RowLayout {
|
||||
spacing: 15
|
||||
|
||||
Controls.ComboBox {
|
||||
id: serialBox
|
||||
model: BmsInterface.serialPortNames()
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Controls.OutlineImageButton {
|
||||
id: refreshButton
|
||||
icon.source: "qrc:/Icons/refresh.svg"
|
||||
icon.width: 30
|
||||
icon.height: 30
|
||||
onClicked: serialBox.model = BmsInterface.serialPortNames()
|
||||
}
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
}
|
||||
@@ -81,6 +97,7 @@ Dialog {
|
||||
onPortConnectedChanged: {
|
||||
connectButton.text = Qt.binding(function() { return BmsInterface.isPortConnected() ? qsTr("Disconnect") : qsTr("Connect") })
|
||||
serialBox.enabled = !BmsInterface.isPortConnected()
|
||||
refreshButton.enabled = !BmsInterface.isPortConnected()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user