颜色映射图例,规格尺寸修改
This commit is contained in:
@@ -2,6 +2,7 @@ import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
import "."
|
||||
import TactileIPC 1.0
|
||||
|
||||
@@ -208,6 +209,42 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 8
|
||||
Label {
|
||||
text: root.tr("宽")
|
||||
Layout.preferredWidth: 90
|
||||
color: root.textColor
|
||||
}
|
||||
SpinBox {
|
||||
Layout.fillWidth: true
|
||||
from: 1
|
||||
to: 20
|
||||
value: Backend.sensorCol
|
||||
enabled: Backend.serial.connected === false
|
||||
onValueModified: Backend.sensorCol = value
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 8
|
||||
Label {
|
||||
text: root.tr("高")
|
||||
Layout.preferredWidth: 90
|
||||
color: root.textColor
|
||||
}
|
||||
SpinBox {
|
||||
Layout.fillWidth: true
|
||||
from: 1
|
||||
to: 20
|
||||
value: Backend.sensorRow
|
||||
enabled: Backend.serial.connected === false
|
||||
onValueModified: Backend.sensorRow = value
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 12
|
||||
@@ -372,6 +409,150 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
CollapsiblePanel {
|
||||
title: root.tr("颜色映射")
|
||||
expanded: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 8
|
||||
Label {
|
||||
text: root.tr("最小值")
|
||||
Layout.preferredWidth: 90
|
||||
color: root.textColor
|
||||
}
|
||||
SpinBox {
|
||||
Layout.fillWidth: true
|
||||
from: -999999
|
||||
to: 999999
|
||||
editable: true
|
||||
value: Backend.rangeMin
|
||||
onValueModified: Backend.rangeMin = value
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 8
|
||||
Label {
|
||||
text: root.tr("最大值")
|
||||
Layout.preferredWidth: 90
|
||||
color: root.textColor
|
||||
}
|
||||
SpinBox {
|
||||
Layout.fillWidth: true
|
||||
from: -999999
|
||||
to: 999999
|
||||
editable: true
|
||||
value: Backend.rangeMax
|
||||
onValueModified: Backend.rangeMax = value
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 8
|
||||
Label {
|
||||
text: root.tr("低色")
|
||||
Layout.preferredWidth: 90
|
||||
color: root.textColor
|
||||
}
|
||||
Rectangle {
|
||||
width: 22
|
||||
height: 22
|
||||
radius: 4
|
||||
color: Backend.colorLow
|
||||
border.width: 1
|
||||
border.color: Qt.rgba(0, 0, 0, 0.2)
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
lowColorDialog.selectedColor = Backend.colorLow
|
||||
lowColorDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
Button {
|
||||
text: root.tr("选择")
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
lowColorDialog.selectedColor = Backend.colorLow
|
||||
lowColorDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 8
|
||||
Label {
|
||||
text: root.tr("中色")
|
||||
Layout.preferredWidth: 90
|
||||
color: root.textColor
|
||||
}
|
||||
Rectangle {
|
||||
width: 22
|
||||
height: 22
|
||||
radius: 4
|
||||
color: Backend.colorMid
|
||||
border.width: 1
|
||||
border.color: Qt.rgba(0, 0, 0, 0.2)
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
midColorDialog.selectedColor = Backend.colorMid
|
||||
midColorDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
Button {
|
||||
text: root.tr("选择")
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
midColorDialog.selectedColor = Backend.colorMid
|
||||
midColorDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 8
|
||||
Label {
|
||||
text: root.tr("高色")
|
||||
Layout.preferredWidth: 90
|
||||
color: root.textColor
|
||||
}
|
||||
Rectangle {
|
||||
width: 22
|
||||
height: 22
|
||||
radius: 4
|
||||
color: Backend.colorHigh
|
||||
border.width: 1
|
||||
border.color: Qt.rgba(0, 0, 0, 0.2)
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
highColorDialog.selectedColor = Backend.colorHigh
|
||||
highColorDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
Button {
|
||||
text: root.tr("选择")
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
highColorDialog.selectedColor = Backend.colorHigh
|
||||
highColorDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CollapsiblePanel {
|
||||
title: root.tr("显示控制")
|
||||
expanded: true
|
||||
@@ -399,7 +580,14 @@ Rectangle {
|
||||
Button {
|
||||
Layout.fillWidth: true
|
||||
text: root.tr("导出数据")
|
||||
onClicked: exportDlg.open()
|
||||
onClicked: {
|
||||
if (Backend.data.frameCount != 0) {
|
||||
exportDlg.open()
|
||||
}
|
||||
else {
|
||||
console.log("Backend.data.frameCount() === 0")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -407,6 +595,25 @@ Rectangle {
|
||||
Item { Layout.fillHeight: true }
|
||||
}
|
||||
}
|
||||
|
||||
ColorDialog {
|
||||
id: lowColorDialog
|
||||
title: root.tr("选择低色")
|
||||
onAccepted: Backend.colorLow = selectedColor
|
||||
}
|
||||
|
||||
ColorDialog {
|
||||
id: midColorDialog
|
||||
title: root.tr("选择中色")
|
||||
onAccepted: Backend.colorMid = selectedColor
|
||||
}
|
||||
|
||||
ColorDialog {
|
||||
id: highColorDialog
|
||||
title: root.tr("选择高色")
|
||||
onAccepted: Backend.colorHigh = selectedColor
|
||||
}
|
||||
|
||||
SaveAsExportDialog {
|
||||
id: exportDlg
|
||||
/* onSaveTo: (folder, filename, format, method) => {
|
||||
|
||||
Reference in New Issue
Block a user