2024-10-15 19:26:12 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
2021-09-28 15:04:06 +00:00
|
|
|
|
2021-10-06 10:23:01 +00:00
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
2021-09-28 15:04:06 +00:00
|
|
|
import utils 1.0
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared 1.0
|
|
|
|
import shared.status 1.0
|
|
|
|
import shared.controls 1.0
|
2021-07-23 15:08:52 +00:00
|
|
|
|
2021-11-15 10:17:41 +00:00
|
|
|
import "../stores"
|
|
|
|
|
2021-07-23 15:08:52 +00:00
|
|
|
Column {
|
2021-11-15 10:17:41 +00:00
|
|
|
property RootStore store
|
|
|
|
|
2021-07-23 15:08:52 +00:00
|
|
|
spacing: 0
|
|
|
|
StatusSectionHeadline {
|
|
|
|
text: qsTr("Bandwidth")
|
2024-10-15 19:26:12 +00:00
|
|
|
topPadding: Theme.bigPadding
|
|
|
|
bottomPadding: Theme.padding
|
2021-07-23 15:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Row {
|
|
|
|
width: parent.width
|
|
|
|
spacing: 10
|
2021-10-06 10:23:01 +00:00
|
|
|
StatusBaseText {
|
2021-07-26 22:09:58 +00:00
|
|
|
text: qsTr("Upload")
|
2021-07-23 15:08:52 +00:00
|
|
|
width: 250
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
width: 140
|
|
|
|
height: 44
|
2021-10-06 10:23:01 +00:00
|
|
|
// TODO: replace with StatusInput from StatusQ at some point
|
2021-07-23 15:08:52 +00:00
|
|
|
Input {
|
|
|
|
id: uploadRate
|
2021-11-15 10:17:41 +00:00
|
|
|
text: Math.round(parseInt(store.nodeModelInst.uploadRate, 10) / 1024 * 100) / 100
|
2021-07-23 15:08:52 +00:00
|
|
|
width: parent.width
|
|
|
|
readOnly: true
|
|
|
|
customHeight: 44
|
|
|
|
placeholderText: "0"
|
|
|
|
anchors.top: parent.top
|
|
|
|
}
|
|
|
|
|
2021-10-06 10:23:01 +00:00
|
|
|
StatusBaseText {
|
|
|
|
color: Theme.palette.directColor7
|
2021-07-26 22:09:58 +00:00
|
|
|
text: qsTr("Kb/s")
|
2021-07-23 15:08:52 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.right: uploadRate.right
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.rightMargin: Theme.padding
|
2021-07-23 15:08:52 +00:00
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-06 10:23:01 +00:00
|
|
|
StatusBaseText {
|
2021-07-26 22:09:58 +00:00
|
|
|
text: qsTr("Download")
|
2021-07-23 15:08:52 +00:00
|
|
|
width: 273
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
width: 140
|
|
|
|
height: 44
|
2021-10-06 10:23:01 +00:00
|
|
|
// TODO: replace with StatusInput from StatusQ at some point
|
2021-07-23 15:08:52 +00:00
|
|
|
Input {
|
|
|
|
id: downloadRate
|
2021-11-15 10:17:41 +00:00
|
|
|
text: Math.round(parseInt(store.nodeModelInst.downloadRate, 10) / 1024 * 100) / 100
|
2021-07-23 15:08:52 +00:00
|
|
|
width: parent.width
|
|
|
|
readOnly: true
|
|
|
|
customHeight: 44
|
|
|
|
placeholderText: "0"
|
|
|
|
anchors.top: parent.top
|
|
|
|
}
|
|
|
|
|
2021-10-06 10:23:01 +00:00
|
|
|
StatusBaseText {
|
|
|
|
color: Theme.palette.directColor7
|
2021-07-26 22:09:58 +00:00
|
|
|
text: qsTr("Kb/s")
|
2021-07-23 15:08:52 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.right: downloadRate.right
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.rightMargin: Theme.padding
|
2021-07-23 15:08:52 +00:00
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-10-06 10:23:01 +00:00
|
|
|
}
|