added restapi

This commit is contained in:
2026-11-02 16:46:20 +03:00
parent 9d74d06ce3
commit 588c2e0135
74 changed files with 7253 additions and 129 deletions
+37 -11
View File
@@ -89,11 +89,11 @@ Item {
anchors.leftMargin: 4
anchors.rightMargin: 4
spacing: 2
Text { Layout.preferredWidth: parent.width * 0.18; text: "Имя"; color: page.muted; font.pixelSize: 11 }
Text { Layout.preferredWidth: parent.width * 0.26; text: "MAC"; color: page.muted; font.pixelSize: 11 }
Text { Layout.preferredWidth: parent.width * 0.12; text: "Аккум."; color: page.muted; font.pixelSize: 11 }
Text { Layout.preferredWidth: parent.width * 0.18; text: "Показание"; color: page.muted; font.pixelSize: 11 }
Text { Layout.preferredWidth: parent.width * 0.12; text: "RSSI"; color: page.muted; font.pixelSize: 11 }
Text { Layout.preferredWidth: parent.width * 0.16; text: "Имя"; color: page.muted; font.pixelSize: 11; elide: Text.ElideRight }
Text { Layout.preferredWidth: parent.width * 0.22; text: "MAC"; color: page.muted; font.pixelSize: 11; elide: Text.ElideRight }
Text { Layout.preferredWidth: parent.width * 0.22; text: "Батарея"; color: page.muted; font.pixelSize: 11; elide: Text.ElideRight }
Text { Layout.preferredWidth: parent.width * 0.22; text: "Показание"; color: page.muted; font.pixelSize: 11; elide: Text.ElideRight }
Text { Layout.preferredWidth: parent.width * 0.10; text: "RSSI"; color: page.muted; font.pixelSize: 11; elide: Text.ElideRight }
Text { Layout.fillWidth: true; text: "Давно"; color: page.muted; font.pixelSize: 11 }
}
}
@@ -107,7 +107,7 @@ Item {
spacing: 2
delegate: Rectangle {
width: table.width
height: 28
height: 32
color: page.rowBg
radius: 2
opacity: modelData.empty ? 0.45 : 1.0
@@ -117,36 +117,39 @@ Item {
anchors.rightMargin: 4
spacing: 2
Text {
Layout.preferredWidth: parent.width * 0.18
Layout.preferredWidth: parent.width * 0.16
text: modelData.empty ? ("слот " + modelData.slot) : (modelData.name || "—")
color: page.fg
font.pixelSize: 11
elide: Text.ElideRight
}
Text {
Layout.preferredWidth: parent.width * 0.26
Layout.preferredWidth: parent.width * 0.22
text: modelData.empty ? "—" : modelData.mac
color: page.fg
font.pixelSize: 11
elide: Text.ElideRight
}
Text {
Layout.preferredWidth: parent.width * 0.12
Layout.preferredWidth: parent.width * 0.22
text: modelData.empty ? "—" : modelData.battery
color: page.fg
font.pixelSize: 11
elide: Text.ElideRight
}
Text {
Layout.preferredWidth: parent.width * 0.18
Layout.preferredWidth: parent.width * 0.22
text: modelData.empty ? "—" : modelData.reading
color: page.fg
font.pixelSize: 11
elide: Text.ElideRight
}
Text {
Layout.preferredWidth: parent.width * 0.12
Layout.preferredWidth: parent.width * 0.10
text: modelData.empty ? "—" : modelData.rssi
color: page.fg
font.pixelSize: 11
elide: Text.ElideRight
}
Text {
Layout.fillWidth: true
@@ -197,6 +200,25 @@ Item {
}
}
Button {
Layout.fillWidth: true
Layout.preferredHeight: 40
text: "Калибровка"
onClicked: calibDialog.open()
background: Rectangle {
radius: 4
color: parent.down ? "#3a3a58" : "#2a2a40"
border.color: "#555570"
}
contentItem: Text {
text: parent.text
color: page.fg
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pixelSize: 14
}
}
Button {
Layout.fillWidth: true
Layout.preferredHeight: 40
@@ -219,4 +241,8 @@ Item {
}
}
}
CalibrationDialog {
id: calibDialog
}
}