更新配置文件的精度因子

main
HwangKC 2025-03-27 21:16:27 +08:00
parent 746cdcf02d
commit 7872e31816
4 changed files with 189 additions and 492 deletions

View File

@ -264,7 +264,7 @@ void CustomDisplayPanel::UpdateTemperature(OpenJson &json,bool app/*=false*/)
font.setPixelSize(16); font.setPixelSize(16);
font.setBold(true); font.setBold(true);
item->setFont(font); item->setFont(font);
//item->setForeground(QBrush(QColor("#2E86C1"))); item->setForeground(QBrush(QColor("#2E86C1")));
item->setForeground(QColor(Qt::red)); item->setForeground(QColor(Qt::red));
m_pTableWidget->setItem(i, col++, item); m_pTableWidget->setItem(i, col++, item);
@ -278,7 +278,7 @@ void CustomDisplayPanel::UpdateTemperature(OpenJson &json,bool app/*=false*/)
font2.setPixelSize(16); font2.setPixelSize(16);
//font2.setBold(true); //font2.setBold(true);
item2->setFont(font2); item2->setFont(font2);
//item2->setForeground(QBrush(QColor("#2E86C1"))); item2->setForeground(QBrush(QColor("#2E86C1")));
item2->setForeground(QColor(Qt::red)); item2->setForeground(QColor(Qt::red));
m_pTableWidget->setItem(i, col, item2); m_pTableWidget->setItem(i, col, item2);

View File

@ -11,6 +11,7 @@ data=8
parity=0 parity=0
stop=1 stop=1
interval=15 interval=15
delay=1000
[slaves] [slaves]
slave_id=1 slave_id=1

File diff suppressed because it is too large Load Diff

View File

@ -133,9 +133,6 @@ void FormSerialPortSettingDialog::InitializeUi()
if (targetIndex != -1) if (targetIndex != -1)
{ {
ui->cb_baund->setCurrentIndex(targetIndex); // 自动触发滚动定位[3](@ref) ui->cb_baund->setCurrentIndex(targetIndex); // 自动触发滚动定位[3](@ref)
// 强制更新视图(适用于隐藏后重新显示)
//ui->cb_baund->showPopup();
//ui->cb_baund->hidePopup();
} }
QString com = pSettings->value("modbus/com","COM1").toString(); QString com = pSettings->value("modbus/com","COM1").toString();
@ -154,9 +151,6 @@ void FormSerialPortSettingDialog::InitializeUi()
if (targetIndex != -1) if (targetIndex != -1)
{ {
ui->cb_data->setCurrentIndex(targetIndex); // 自动触发滚动定位[3](@ref) ui->cb_data->setCurrentIndex(targetIndex); // 自动触发滚动定位[3](@ref)
// 强制更新视图(适用于隐藏后重新显示)
// ui->cb_data->showPopup();
//ui->cb_data->hidePopup();
} }
int parity = pSettings->value("modbus/parity",0).toInt(); int parity = pSettings->value("modbus/parity",0).toInt();
@ -174,9 +168,6 @@ void FormSerialPortSettingDialog::InitializeUi()
if (targetIndex != -1) if (targetIndex != -1)
{ {
ui->cb_parity->setCurrentIndex(targetIndex); // 自动触发滚动定位[3](@ref) ui->cb_parity->setCurrentIndex(targetIndex); // 自动触发滚动定位[3](@ref)
// 强制更新视图(适用于隐藏后重新显示)
//ui->cb_parity->showPopup();
//ui->cb_parity->hidePopup();
} }
int stop = pSettings->value("modbus/stop",1).toInt(); int stop = pSettings->value("modbus/stop",1).toInt();
@ -186,9 +177,6 @@ void FormSerialPortSettingDialog::InitializeUi()
if (targetIndex != -1) if (targetIndex != -1)
{ {
ui->cb_stop->setCurrentIndex(targetIndex); // 自动触发滚动定位[3](@ref) ui->cb_stop->setCurrentIndex(targetIndex); // 自动触发滚动定位[3](@ref)
// 强制更新视图(适用于隐藏后重新显示)
//ui->cb_stop->showPopup();
//ui->cb_stop->hidePopup();
} }
int interval = pSettings->value("modbus/interval",15).toInt(); int interval = pSettings->value("modbus/interval",15).toInt();