From 8aee1d804885c0e2b96516f48fb2a178427b684a Mon Sep 17 00:00:00 2001 From: yuntang <123@qq.com> Date: Fri, 18 Apr 2025 17:30:35 +0800 Subject: [PATCH] 2025-04-18T17:30:34 --- src/AnalysTool.pro | 3 + src/data/pointcalculate.cpp | 27 ++- src/global.cpp | 3 + src/global.h | 6 + src/main.cpp | 9 + src/mainwindow.cpp | 10 +- src/mainwindow.h | 6 +- src/mainwindow.ui | 12 +- src/ui/coefficientselectionform.cpp | 240 ++++++++++++++++++++++++++ src/ui/coefficientselectionform.h | 35 ++++ src/ui/coefficientselectionform.ui | 200 +++++++++++++++++++++ src/ui/enthalpydatacorrectionform.cpp | 167 +++++++++++++++++- src/ui/enthalpydatacorrectionform.h | 9 +- src/ui/enthalpydatacorrectionform.ui | 42 ++++- src/ui/instrumentcoefficientform.cpp | 3 + 15 files changed, 757 insertions(+), 15 deletions(-) create mode 100644 src/ui/coefficientselectionform.cpp create mode 100644 src/ui/coefficientselectionform.h create mode 100644 src/ui/coefficientselectionform.ui diff --git a/src/AnalysTool.pro b/src/AnalysTool.pro index 4772a8c..a625e63 100644 --- a/src/AnalysTool.pro +++ b/src/AnalysTool.pro @@ -25,6 +25,7 @@ SOURCES += \ global.cpp \ logger/logger.cpp \ ui/aboutform.cpp \ + ui/coefficientselectionform.cpp \ ui/enthalpydatacorrectionform.cpp \ ui/rightwidget.cpp \ thirdparty/easylogging/easylogging++.cc \ @@ -55,6 +56,7 @@ HEADERS += \ defines.h \ logger/logger.h \ ui/aboutform.h \ + ui/coefficientselectionform.h \ ui/enthalpydatacorrectionform.h \ ui/rightwidget.h \ thirdparty/easylogging/easylogging++.h \ @@ -79,6 +81,7 @@ HEADERS += \ FORMS += \ mainwindow.ui \ ui/aboutform.ui \ + ui/coefficientselectionform.ui \ ui/degreeofcrystallinityform.ui \ ui/degreeofcureform.ui \ ui/enthalpydatacorrectionform.ui \ diff --git a/src/data/pointcalculate.cpp b/src/data/pointcalculate.cpp index 2f9763d..a2ecc53 100644 --- a/src/data/pointcalculate.cpp +++ b/src/data/pointcalculate.cpp @@ -2,6 +2,8 @@ #include "pointcalculate.h" #include "logger.h" +#include "global.h" +#include "confighandler.h" QVectorPointCalculate:: _dataVtr; QPointF PointCalculate::_peakPoint; @@ -246,8 +248,31 @@ float PointCalculate::calculateArea() { integral += std::abs(cellArea); } + /* + * H = K * S / w; + */ + float coefficient = 0.0f; + if(Global::_enthalpyCoefficientEnableFlag){ + float startTemp = _leftSelectedPoint.x(); - return integral; + float value1 = Global::_enthalpyCoefficientVtr.at(0); + float value2 = Global::_enthalpyCoefficientVtr.at(0); + float value3 = Global::_enthalpyCoefficientVtr.at(0); + + coefficient = value1 * startTemp * startTemp + + value2 * startTemp + + value3; + + }else{ + coefficient = ConfigHandler::_configMap[ConInstrumentCoefficientStr].toFloat(); + } + + logde<<"coefficient:"< PointCalculate::calculateStartAndEndPoint() diff --git a/src/global.cpp b/src/global.cpp index f106fd4..3299657 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -7,6 +7,9 @@ QVector _curveFileDataVtr; ExperimentInfo _experimentInfo; QVector _curveExperimentDataVtr; + +bool _enthalpyCoefficientEnableFlag = false; +QVector _enthalpyCoefficientVtr; } #if 0 diff --git a/src/global.h b/src/global.h index 10d7b14..44d3793 100644 --- a/src/global.h +++ b/src/global.h @@ -78,6 +78,12 @@ extern QVector _curveFileDataVtr; // Experiment setting data. extern ExperimentInfo _experimentInfo; extern QVector _curveExperimentDataVtr; + +// +extern bool _enthalpyCoefficientEnableFlag; +//abc +extern QVector _enthalpyCoefficientVtr; + } #if 0 diff --git a/src/main.cpp b/src/main.cpp index 6c24162..348ee67 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,22 +25,31 @@ int main(int argc, char *argv[]) logde<<"config,instrument coefficient:" <setupUi(this); this->setToolTip("....."); @@ -73,6 +74,7 @@ MainWindow::MainWindow(QWidget *parent) setSubWidgetAttribute(_degreeOfCrystallinityForm); setSubWidgetAttribute(_aboutForm); setSubWidgetAttribute(_enthalpyDataCorrectionForm); + setSubWidgetAttribute(_coefficientSelectionForm); // setActionEnable(true); @@ -332,7 +334,13 @@ void MainWindow::on_actionAbout_triggered() _aboutForm->show(); } -void MainWindow::on_actionEnthalpyCorrection_triggered() + +void MainWindow::on_actionEnthalpyCorrectionEdit_triggered() { _enthalpyDataCorrectionForm->show(); } + +void MainWindow::on_actionEnthalpyCorrectionSelection_triggered() +{ + _coefficientSelectionForm->show(); +} diff --git a/src/mainwindow.h b/src/mainwindow.h index 9cb2390..8396c05 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -19,6 +19,7 @@ #include "oitautoanalysisparamform.h" #include "aboutform.h" #include "enthalpydatacorrectionform.h" +#include "coefficientselectionform.h" QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } @@ -75,7 +76,9 @@ private slots: void on_actionAbout_triggered(); - void on_actionEnthalpyCorrection_triggered(); + void on_actionEnthalpyCorrectionEdit_triggered(); + + void on_actionEnthalpyCorrectionSelection_triggered(); private: void connections(); @@ -98,5 +101,6 @@ private: OITAutoAnalysisParamForm* _OITAutoAnalysisParamForm; AboutForm *_aboutForm; EnthalpyDataCorrectionForm* _enthalpyDataCorrectionForm; + CoefficientSelectionForm * _coefficientSelectionForm; }; #endif // MAINWINDOW_H diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 2e765c3..8fe642a 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -67,7 +67,8 @@ 工具 - + + @@ -254,9 +255,14 @@ 关于 - + - 热焓校正 + 热焓校正系数编辑 + + + + + 热焓校正系数选择 diff --git a/src/ui/coefficientselectionform.cpp b/src/ui/coefficientselectionform.cpp new file mode 100644 index 0000000..d326881 --- /dev/null +++ b/src/ui/coefficientselectionform.cpp @@ -0,0 +1,240 @@ +#include + +#include "coefficientselectionform.h" +#include "ui_coefficientselectionform.h" +#include "confighandler.h" +#include "logger.h" +#include "global.h" + +CoefficientSelectionForm::CoefficientSelectionForm(QWidget *parent) : + QWidget(parent), + ui(new Ui::CoefficientSelectionForm) +{ + ui->setupUi(this); + + setWindowTitle("热焓校正系数选择"); + +#if 1 + ui->LineEditCoefficient->setText( + QString::number( + ConfigHandler::_configMap[ConInstrumentCoefficientStr].toFloat(), + 'f',3)); +#endif + + ui->radioButtonSinglePointCoefficient->setChecked(true); + ui->radioButtonSinglePointCoefficient->setChecked(false); + + on_radioButtonSinglePointCoefficient_toggled(true); + on_radioButtonMultiPointCoefficient_toggled(false); + + ui->textEditFileContent->setReadOnly(true); +} + +CoefficientSelectionForm::~CoefficientSelectionForm() +{ + delete ui; +} + +void CoefficientSelectionForm::on_pushButtonCalculate_clicked() +{ + float theory = ui->LineEditTheory->text().toFloat(); + float measure = ui->LineEditActualMeasurement->text().toFloat(); + + _instrumentCoefficient = theory/measure; + ui->LineEditCoefficient->setText(QString::number(_instrumentCoefficient,'f',3)); + +} + +void CoefficientSelectionForm::on_pushButtonConfirm_clicked() +{ + if(ui->radioButtonSinglePointCoefficient->isChecked()){ + ConfigHandler::_configMap[ConInstrumentCoefficientStr] = _instrumentCoefficient; + ConfigHandler::writer(); + + Global::_enthalpyCoefficientEnableFlag = false; + }else{ + QVector xVtr,yVtr; + QJsonDocument jsonDoc = QJsonDocument::fromJson(_jsonStr.toUtf8()); + QJsonArray jsonArray = jsonDoc.array(); + + for (const QJsonValue &value : jsonArray) { + QJsonObject jsonObj = value.toObject(); + xVtr<LineEditTheory->clear(); + ui->LineEditCoefficient->clear(); + + ui->labelFilePath->clear(); + ui->textEditFileContent->clear(); + + _jsonStr.clear(); + + hide(); +} + +void CoefficientSelectionForm::on_pushButtonSelectFile_clicked() +{ + QString filePath = QFileDialog::getOpenFileName( + nullptr, "选择 JSON 文件", "", "JSON 文件 (*.json);;所有文件 (*.*)"); + + if (!filePath.isEmpty()) { + QFile file(filePath); + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { + QTextStream in(&file); + _jsonStr = in.readAll(); + file.close(); + + } else { + qDebug() << "无法打开文件:" << filePath; + return; + } + } else { + qDebug() << "未选择文件"; + return; + } + + // + ui->labelFilePath->setText(filePath); + ui->textEditFileContent->setText(_jsonStr); +} + +void CoefficientSelectionForm::on_radioButtonSinglePointCoefficient_toggled(bool checked) +{ + ui->LineEditTheory->setEnabled(checked); + ui->LineEditCoefficient->setEnabled(checked); + ui->LineEditActualMeasurement->setEnabled(checked); + + ui->pushButtonCalculate->setEnabled(checked); +#if 0 + if(checked){ + ui->LineEditTheory->setEnabled(true); + ui->LineEditCoefficient->setEnabled(true); + ui->LineEditActualMeasurement->setEnabled(true); + + ui->pushButtonCalculate->setEnabled(true); + }else{ + + ui->LineEditTheory->setEnabled(false); + ui->LineEditCoefficient->setEnabled(false); + ui->LineEditActualMeasurement->setEnabled(false); + + ui->pushButtonCalculate->setEnabled(false); + } +#endif +} + +void CoefficientSelectionForm::on_radioButtonMultiPointCoefficient_toggled(bool checked) +{ + ui->pushButtonSelectFile->setEnabled(checked); + ui->textEditFileContent->setEnabled(checked); +#if 0 + if(checked){ + ui->pushButtonSelectFile->setEnabled(true); + ui->textEditFileContent->setEnabled(true); + }else{ + ui->pushButtonSelectFile->setEnabled(false); + ui->textEditFileContent->setEnabled(false); + } +#endif +} + +void CoefficientSelectionForm::cubicLeastSquaresFit( + double x[], double y[], int n, double coeff[]) +{ + int i, j, k; + double atemp[3] = {0}; // 存储x^0, x^1, x^2的和 + double b[3] = {0}; // 右侧向量 + + // 计算各次幂的和 + for (i = 0; i < n; i++) { + double xi = x[i]; + double xi_pow2 = xi * xi; // x^2 + + // 累加atemp[0]到atemp[2] + atemp[0] += 1; // x^0的和等于数据点个数 + atemp[1] += xi; + atemp[2] += xi_pow2; + + // 计算右侧向量b + double yi = y[i]; + b[0] += yi; + b[1] += yi * xi; + b[2] += yi * xi_pow2; + } + + // 构建法方程矩阵 + double a[3][3]; + a[0][0] = atemp[0]; + a[0][1] = atemp[1]; + a[0][2] = atemp[2]; + a[1][0] = atemp[1]; + a[1][1] = atemp[2]; + a[1][2] = 0; + a[2][0] = atemp[2]; + a[2][1] = 0; + a[2][2] = 0; + + // 高斯列主元消元法 + for (k = 0; k < 2; k++) { // 消去第k列 + // 寻找主元行 + int max_row = k; + double max_val = fabs(a[k][k]); + for (i = k + 1; i < 3; i++) { + if (fabs(a[i][k]) > max_val) { + max_val = fabs(a[i][k]); + max_row = i; + } + } + + // 交换行 + if (max_row != k) { + for (j = k; j < 3; j++) { + double temp = a[k][j]; + a[k][j] = a[max_row][j]; + a[max_row][j] = temp; + } + double temp_b = b[k]; + b[k] = b[max_row]; + b[max_row] = temp_b; + } + + // 消元 + for (i = k + 1; i < 3; i++) { + double factor = a[i][k] / a[k][k]; + for (j = k; j < 3; j++) { + a[i][j] -= factor * a[k][j]; + } + b[i] -= factor * b[k]; + } + } + + // 回代求解 + coeff[2] = b[2] / a[2][2]; + for (i = 1; i >= 0; i--) { + double sum = 0.0; + for (j = i + 1; j < 3; j++) { + sum += a[i][j] * coeff[j]; + } + coeff[i] = (b[i] - sum) / a[i][i]; + } +} diff --git a/src/ui/coefficientselectionform.h b/src/ui/coefficientselectionform.h new file mode 100644 index 0000000..08fb3b4 --- /dev/null +++ b/src/ui/coefficientselectionform.h @@ -0,0 +1,35 @@ +#ifndef COEFFICIENTSELECTIONFORM_H +#define COEFFICIENTSELECTIONFORM_H + +#include + +namespace Ui { +class CoefficientSelectionForm; +} + +class CoefficientSelectionForm : public QWidget +{ + Q_OBJECT + +public: + explicit CoefficientSelectionForm(QWidget *parent = nullptr); + ~CoefficientSelectionForm(); + +private slots: + void on_radioButtonSinglePointCoefficient_toggled(bool checked); + void on_radioButtonMultiPointCoefficient_toggled(bool checked); + + void on_pushButtonCalculate_clicked(); + void on_pushButtonSelectFile_clicked(); + + void on_pushButtonConfirm_clicked(); + void on_pushButtonExit_clicked(); +private: + void cubicLeastSquaresFit(double x[], double y[], int n, double coeff[4]); + + QString _jsonStr; + Ui::CoefficientSelectionForm *ui; + float _instrumentCoefficient; +}; + +#endif // COEFFICIENTSELECTIONFORM_H diff --git a/src/ui/coefficientselectionform.ui b/src/ui/coefficientselectionform.ui new file mode 100644 index 0000000..83ba160 --- /dev/null +++ b/src/ui/coefficientselectionform.ui @@ -0,0 +1,200 @@ + + + CoefficientSelectionForm + + + + 0 + 0 + 543 + 351 + + + + Form + + + + + 10 + 40 + 221 + 111 + + + + 参数 + + + + + 10 + 30 + 201 + 78 + + + + + + + 理论熔融热焓(J/g): + + + + + + + + + + 实测熔融热焓(J/g): + + + + + + + + + + + + + 400 + 320 + 80 + 20 + + + + 退出 + + + + + + 250 + 10 + 91 + 18 + + + + 多点系数 + + + + + + 10 + 170 + 221 + 81 + + + + 计算结果 + + + + + 10 + 30 + 191 + 41 + + + + + + + 仪器系数 K: + + + + + + + + + + + + + 20 + 10 + 91 + 18 + + + + 单点系数 + + + + + + 290 + 320 + 80 + 20 + + + + 确定 + + + + + + 110 + 270 + 85 + 20 + + + + 计算 + + + + + + 250 + 40 + 281 + 16 + + + + 当前热焓文件: + + + + + + 250 + 90 + 261 + 221 + + + + + + + 410 + 60 + 85 + 20 + + + + 选择文件 + + + + + + diff --git a/src/ui/enthalpydatacorrectionform.cpp b/src/ui/enthalpydatacorrectionform.cpp index c737576..9cc6063 100644 --- a/src/ui/enthalpydatacorrectionform.cpp +++ b/src/ui/enthalpydatacorrectionform.cpp @@ -1,3 +1,11 @@ +#include +#include +#include +#include +#include +#include +#include + #include "enthalpydatacorrectionform.h" #include "ui_enthalpydatacorrectionform.h" @@ -7,12 +15,11 @@ EnthalpyDataCorrectionForm::EnthalpyDataCorrectionForm(QWidget *parent) : { ui->setupUi(this); - setWindowTitle("热焓校正"); - -// ui->lineEditTheoryIn->setText("28.6"); -// ui->lineEditTheorySn->setText("60.5"); -// ui->lineEditTheoryBi->setText("53.3"); + setWindowTitle("热焓校正参数编辑"); + // ui->lineEditTheoryIn->setText("28.6"); + // ui->lineEditTheorySn->setText("60.5"); + // ui->lineEditTheoryBi->setText("53.3"); } @@ -23,10 +30,160 @@ EnthalpyDataCorrectionForm::~EnthalpyDataCorrectionForm() void EnthalpyDataCorrectionForm::on_pushButtonSave_clicked() { + if(ui->checkBoxC6H12->isChecked()){ + float theory = ui->lineEditTheoryC6H12->text().toFloat(); + float measure = ui->lineEditMeasC6H12->text().toFloat(); + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxHg->isChecked()){ + float theory = ui->lineEditTheoryHg->text().toFloat(); + float measure = ui->lineEditMeasHg->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxC6H5COOH->isChecked()){ + float theory = ui->lineEditTheoryC6H5COOH->text().toFloat(); + float measure = ui->lineEditMeasC6H5COOH->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxIn->isChecked()){ + float theory = ui->lineEditTheoryIn->text().toFloat(); + float measure = ui->lineEditMeasIn->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxSn->isChecked()){ + float theory = ui->lineEditTheorySn->text().toFloat(); + float measure = ui->lineEditMeasSn->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxBi->isChecked()){ + float theory = ui->lineEditTheoryBi->text().toFloat(); + float measure = ui->lineEditMeasBi->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxKC1O3->isChecked()){ + float theory = ui->lineEditTheoryKC1O3->text().toFloat(); + float measure = ui->lineEditMeasKC103->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxPb->isChecked()){ + float theory = ui->lineEditTheoryPb->text().toFloat(); + float measure = ui->lineEditMeasPb->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxKNO3->isChecked()){ + float theory = ui->lineEditTheoryKNO3->text().toFloat(); + float measure = ui->lineEditMeasKNO3->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxZn->isChecked()){ + float theory = ui->lineEditTheoryZn->text().toFloat(); + float measure = ui->lineEditMeasZn->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxAg2SO4->isChecked()){ + float theory = ui->lineEditTheoryAg2SO4->text().toFloat(); + float measure = ui->lineEditMeasAg2SO4->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxCsCl->isChecked()){ + float theory = ui->lineEditTheoryCsC1->text().toFloat(); + float measure = ui->lineEditMeasCsCl->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxSiO2->isChecked()){ + float theory = ui->lineEditTheorySiO2->text().toFloat(); + float measure = ui->lineEditMeasSiO2->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxK2SO4->isChecked()){ + float theory = ui->lineEditTheoryK2SO4->text().toFloat(); + float measure = ui->lineEditMeasK2SO4->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxK2CrO4->isChecked()){ + float theory = ui->lineEditTheoryK2CrO4->text().toFloat(); + float measure = ui->lineEditMeasK2CrO4->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxBaCO3->isChecked()){ + float theory = ui->lineEditTheoryBaCO3->text().toFloat(); + float measure = ui->lineEditMeasBaCO3->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxAg->isChecked()){ + float theory = ui->lineEditTheoryAg->text().toFloat(); + float measure = ui->lineEditMeasAg->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + if(ui->checkBoxCu->isChecked()){ + float theory = ui->lineEditTheoryCu->text().toFloat(); + float measure = ui->lineEditMeasCu->text().toFloat(); + + _theoryDataVtr.push_back({theory,theory/measure}); + } + // + saveJson(); } void EnthalpyDataCorrectionForm::on_pushButtonExit_clicked() { hide(); } + +void EnthalpyDataCorrectionForm::saveJson() +{ + // 创建一个 QJsonArray 来存储数据 + QJsonArray jsonArray; + for (const TheoryData &data : _theoryDataVtr) { + QJsonObject jsonObj; + jsonObj["theory"] = data.theory; + jsonObj["rate"] = data.rate; + jsonArray.append(jsonObj); + } + + // 创建一个 QJsonDocument 并设置根数组 + QJsonDocument doc(jsonArray); + + // 打开保存文件对话框,让用户选择保存位置 + QString fileName = QFileDialog::getSaveFileName(nullptr, "保存 JSON 文件", + "new.json", "JSON Files (*.json)"); + if (fileName.isEmpty()) { + qDebug() << "用户取消了操作"; + return; + } + + // 确保文件名以 .json 扩展名结尾 + if (!fileName.endsWith(".json")) { + fileName.append(".json"); + } + + // 写入 JSON 数据到文件 + QFile file(fileName); + if (!file.open(QIODevice::WriteOnly)) { + qDebug() << "无法打开文件进行写入:" << file.errorString(); + return ; + } + + file.write(doc.toJson(QJsonDocument::Indented)); // 以格式化的方式写入 JSON 数据 + file.close(); +} + + + diff --git a/src/ui/enthalpydatacorrectionform.h b/src/ui/enthalpydatacorrectionform.h index 07553bf..9e93f25 100644 --- a/src/ui/enthalpydatacorrectionform.h +++ b/src/ui/enthalpydatacorrectionform.h @@ -19,8 +19,15 @@ private slots: void on_pushButtonSave_clicked(); void on_pushButtonExit_clicked(); - private: + void saveJson(); +private: + struct TheoryData{ + float theory; + float rate; + }; + QVector _theoryDataVtr; + Ui::EnthalpyDataCorrectionForm *ui; }; diff --git a/src/ui/enthalpydatacorrectionform.ui b/src/ui/enthalpydatacorrectionform.ui index 1ed6870..0a26eb2 100644 --- a/src/ui/enthalpydatacorrectionform.ui +++ b/src/ui/enthalpydatacorrectionform.ui @@ -19,7 +19,7 @@ 40 50 431 - 518 + 520 @@ -142,9 +142,18 @@ + + + 9999 + 22 + + 理论温度(℃) + + Qt::AlignBottom|Qt::AlignHCenter + @@ -254,9 +263,18 @@ + + + 9999 + 22 + + 标样 + + Qt::AlignBottom|Qt::AlignHCenter + @@ -316,9 +334,18 @@ + + + 9999 + 22 + + 实测热焓(J/g) + + Qt::AlignBottom|Qt::AlignHCenter + @@ -501,9 +528,18 @@ + + + 9999 + 22 + + 理论热焓(J/g) + + Qt::AlignBottom|Qt::AlignHCenter + @@ -592,11 +628,11 @@ 退出 - + 40 - 10 + 20 344 24 diff --git a/src/ui/instrumentcoefficientform.cpp b/src/ui/instrumentcoefficientform.cpp index 2d33162..f198c9b 100644 --- a/src/ui/instrumentcoefficientform.cpp +++ b/src/ui/instrumentcoefficientform.cpp @@ -14,6 +14,9 @@ InstrumentCoefficientForm::InstrumentCoefficientForm(QWidget *parent) : QString::number( ConfigHandler::_configMap[ConInstrumentCoefficientStr].toFloat(), 'f',3)); + + ui->LineEditTheory->text().clear(); + ui->LineEditActualMeasurement->text().clear(); } InstrumentCoefficientForm::~InstrumentCoefficientForm()