SystemMonitorTab: add polling option

This commit is contained in:
Ly-sec
2025-11-27 15:06:17 +01:00
parent 72263f198e
commit 7cb293733c
15 changed files with 2620 additions and 25 deletions
@@ -114,11 +114,14 @@ ColumnLayout {
spacing: Style.marginM
NText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: I18n.tr("settings.system-monitor.cpu-warning-threshold.label")
pointSize: Style.fontSizeS
}
NSpinBox {
Layout.alignment: Qt.AlignHCenter
from: 0
to: 100
stepSize: 5
@@ -139,11 +142,14 @@ ColumnLayout {
spacing: Style.marginM
NText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: I18n.tr("settings.system-monitor.cpu-critical-threshold.label")
pointSize: Style.fontSizeS
}
NSpinBox {
Layout.alignment: Qt.AlignHCenter
from: Settings.data.systemMonitor.cpuWarningThreshold
to: 100
stepSize: 5
@@ -152,6 +158,28 @@ ColumnLayout {
suffix: "%"
}
}
ColumnLayout {
Layout.fillWidth: true
spacing: Style.marginM
NText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: I18n.tr("settings.system-monitor.polling-interval.label")
pointSize: Style.fontSizeS
}
NSpinBox {
Layout.alignment: Qt.AlignHCenter
from: 250
to: 10000
stepSize: 250
value: Settings.data.systemMonitor.cpuPollingInterval
onValueChanged: Settings.data.systemMonitor.cpuPollingInterval = value
suffix: " ms"
}
}
}
// Temperature
@@ -171,11 +199,14 @@ ColumnLayout {
spacing: Style.marginM
NText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: I18n.tr("settings.system-monitor.temp-warning-threshold.label")
pointSize: Style.fontSizeS
}
NSpinBox {
Layout.alignment: Qt.AlignHCenter
from: 0
to: 100
stepSize: 5
@@ -195,11 +226,14 @@ ColumnLayout {
spacing: Style.marginM
NText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: I18n.tr("settings.system-monitor.temp-critical-threshold.label")
pointSize: Style.fontSizeS
}
NSpinBox {
Layout.alignment: Qt.AlignHCenter
from: Settings.data.systemMonitor.tempWarningThreshold
to: 100
stepSize: 5
@@ -208,6 +242,28 @@ ColumnLayout {
suffix: "°C"
}
}
ColumnLayout {
Layout.fillWidth: true
spacing: Style.marginM
NText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: I18n.tr("settings.system-monitor.polling-interval.label")
pointSize: Style.fontSizeS
}
NSpinBox {
Layout.alignment: Qt.AlignHCenter
from: 250
to: 10000
stepSize: 250
value: Settings.data.systemMonitor.tempPollingInterval
onValueChanged: Settings.data.systemMonitor.tempPollingInterval = value
suffix: " ms"
}
}
}
// Memory Usage
@@ -227,11 +283,14 @@ ColumnLayout {
spacing: Style.marginM
NText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: I18n.tr("settings.system-monitor.mem-warning-threshold.label")
pointSize: Style.fontSizeS
}
NSpinBox {
Layout.alignment: Qt.AlignHCenter
from: 0
to: 100
stepSize: 5
@@ -251,11 +310,14 @@ ColumnLayout {
spacing: Style.marginM
NText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: I18n.tr("settings.system-monitor.mem-critical-threshold.label")
pointSize: Style.fontSizeS
}
NSpinBox {
Layout.alignment: Qt.AlignHCenter
from: Settings.data.systemMonitor.memWarningThreshold
to: 100
stepSize: 5
@@ -264,6 +326,28 @@ ColumnLayout {
suffix: "%"
}
}
ColumnLayout {
Layout.fillWidth: true
spacing: Style.marginM
NText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: I18n.tr("settings.system-monitor.polling-interval.label")
pointSize: Style.fontSizeS
}
NSpinBox {
Layout.alignment: Qt.AlignHCenter
from: 250
to: 10000
stepSize: 250
value: Settings.data.systemMonitor.memPollingInterval
onValueChanged: Settings.data.systemMonitor.memPollingInterval = value
suffix: " ms"
}
}
}
// Disk Usage
@@ -283,11 +367,14 @@ ColumnLayout {
spacing: Style.marginM
NText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: I18n.tr("settings.system-monitor.disk-warning-threshold.label")
pointSize: Style.fontSizeS
}
NSpinBox {
Layout.alignment: Qt.AlignHCenter
from: 0
to: 100
stepSize: 5
@@ -307,11 +394,14 @@ ColumnLayout {
spacing: Style.marginM
NText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: I18n.tr("settings.system-monitor.disk-critical-threshold.label")
pointSize: Style.fontSizeS
}
NSpinBox {
Layout.alignment: Qt.AlignHCenter
from: Settings.data.systemMonitor.diskWarningThreshold
to: 100
stepSize: 5
@@ -320,5 +410,27 @@ ColumnLayout {
suffix: "%"
}
}
ColumnLayout {
Layout.fillWidth: true
spacing: Style.marginM
NText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: I18n.tr("settings.system-monitor.polling-interval.label")
pointSize: Style.fontSizeS
}
NSpinBox {
Layout.alignment: Qt.AlignHCenter
from: 250
to: 10000
stepSize: 250
value: Settings.data.systemMonitor.diskPollingInterval
onValueChanged: Settings.data.systemMonitor.diskPollingInterval = value
suffix: " ms"
}
}
}
}