From 18e29319df4c1d54f2da7831cc3022897377bc64 Mon Sep 17 00:00:00 2001
From: yuntang <123@qq.com>
Date: Mon, 28 Apr 2025 14:16:26 +0800
Subject: [PATCH] 2025-04-28T14:16:25
---
src/mainwindow.cpp | 21 ++++++++++++++-------
src/mainwindow.h | 8 ++++----
src/mainwindow.ui | 18 ++++++++++++------
src/ui/centralwidget.cpp | 2 +-
src/ui/centralwidget.h | 5 +++--
src/ui/degreeofcureform.h | 1 -
src/ui/specificheatcomparisonmethodform.cpp | 8 +++++++-
src/ui/specificheatcomparisonmethodform.h | 2 ++
8 files changed, 43 insertions(+), 22 deletions(-)
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 6e56e1c..c015ef5 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -147,6 +147,8 @@ void MainWindow::connections()
connect(_degreeOfCrystallinityForm,&DegreeOfCrystallinityForm::sigDrawCustomText,
_centralWidget,&CentralWidget::slotDrawCustomText);
+ connect(_specificHeatComparisonMethodForm,&SpecificHeatComparisonMethodForm::sigDrawCustomText,
+ _centralWidget,&CentralWidget::slotDrawCustomText);
//SpecificHeatComparisonMethodForm
connect(_eventHandler,&EventHandler::sigSetCurve,
@@ -325,13 +327,6 @@ void MainWindow::on_actionInstrumentParameter_triggered()
_instrumentCoefficientForm->show();
}
-void MainWindow::on_actionInitialMeltingPoint_triggered()
-{
-}
-
-void MainWindow::on_actionFinalMeltingPoint_triggered()
-{
-}
void MainWindow::on_actionOITAutoAnalysisParam_triggered()
{
@@ -382,3 +377,15 @@ void MainWindow::on_actionPrintPreview_triggered()
_printPreviewForm->setPixmap(_centralWidget->getPixMap());
_printPreviewForm->show();
}
+
+void MainWindow::on_actionOnsetTemperaturePoint_triggered()
+{
+ _rightWidget->show();
+ _centralWidget->setAnalysisMode(CentralWidget::AnalysisMode::OnsetTemperaturePoint);
+}
+
+void MainWindow::on_actionEndsetTemperaturePoint_triggered()
+{
+ _rightWidget->show();
+ _centralWidget->setAnalysisMode(CentralWidget::AnalysisMode::EndsetTemperaturePoint);
+}
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 914675f..86a1eda 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -65,10 +65,6 @@ private slots:
void on_actionInstrumentParameter_triggered();
- void on_actionInitialMeltingPoint_triggered();
-
- void on_actionFinalMeltingPoint_triggered();
-
void on_actionOITAutoAnalysisParam_triggered();
void on_actionOITAutoAnalysisMode_triggered();
@@ -87,6 +83,10 @@ private slots:
void on_actionPrintPreview_triggered();
+ void on_actionOnsetTemperaturePoint_triggered();
+
+ void on_actionEndsetTemperaturePoint_triggered();
+
private:
void connections();
void setActionEnable(const bool);
diff --git a/src/mainwindow.ui b/src/mainwindow.ui
index 1874bf6..1bb6a25 100644
--- a/src/mainwindow.ui
+++ b/src/mainwindow.ui
@@ -58,8 +58,8 @@
-
-
+
+
@@ -222,14 +222,20 @@
仪器系数
-
+
- 初融点
+ 初熔点
+
+
+ 初熔点
-
+
- 终融点
+ 终熔点
+
+
+ 终熔点
diff --git a/src/ui/centralwidget.cpp b/src/ui/centralwidget.cpp
index f2f66e0..52639d7 100644
--- a/src/ui/centralwidget.cpp
+++ b/src/ui/centralwidget.cpp
@@ -83,7 +83,7 @@ CentralWidget::CentralWidget(QWidget *parent)
_customPlot->xAxis->setRange(0,100);
_customPlot->yAxis->setRange(0,20);
- // startTimer(300);
+ // startTimer(300);
}
CentralWidget::~CentralWidget()
diff --git a/src/ui/centralwidget.h b/src/ui/centralwidget.h
index 691cf7b..cd52e85 100644
--- a/src/ui/centralwidget.h
+++ b/src/ui/centralwidget.h
@@ -22,7 +22,9 @@ public:
StartPoint,
StopPoint,
PeakSynthesisAnalysis,
- GlassTransition
+ GlassTransition,
+ OnsetTemperaturePoint,
+ EndsetTemperaturePoint
};
CentralWidget(QWidget *parent = nullptr);
~CentralWidget();
@@ -69,7 +71,6 @@ private:
void drawText(const QPointF,const QString);
void fillGraph(const double x1,const double x2);
-
enum ClearDataMode{
All,
Undo
diff --git a/src/ui/degreeofcureform.h b/src/ui/degreeofcureform.h
index c6b0df7..cd1cc8d 100644
--- a/src/ui/degreeofcureform.h
+++ b/src/ui/degreeofcureform.h
@@ -15,7 +15,6 @@ public:
explicit DegreeOfCureForm(QWidget *parent = nullptr);
~DegreeOfCureForm();
-
private slots:
void on_pushButtonCalculate_clicked();
diff --git a/src/ui/specificheatcomparisonmethodform.cpp b/src/ui/specificheatcomparisonmethodform.cpp
index 99b55d1..d1e3ac7 100644
--- a/src/ui/specificheatcomparisonmethodform.cpp
+++ b/src/ui/specificheatcomparisonmethodform.cpp
@@ -157,7 +157,7 @@ void SpecificHeatComparisonMethodForm::on_pushButtonCalculate_clicked()
logde<<"standardSamplePoint:"<LineEditStandardSampleWeight->text().toFloat();
@@ -171,6 +171,12 @@ void SpecificHeatComparisonMethodForm::on_pushButtonCalculate_clicked()
ui->LineEditStandardSampleSpecificHeat->setText(QString::number(cp,'f',3));
ui->LineEditSampleSpecificHeat->setText(QString::number(cpTarget,'f',3));
+
+// 100℃比热容=x J/(g*℃)
+ QString str = QString("%1℃比热容= %2J/(g*℃)")
+ .arg(QString::number(targetTemperature,'f',3))
+ .arg(QString::number(cpTarget,'f',3));
+ emit sigDrawCustomText(str);
}
void SpecificHeatComparisonMethodForm::on_pushButtonQuit_clicked()
diff --git a/src/ui/specificheatcomparisonmethodform.h b/src/ui/specificheatcomparisonmethodform.h
index c0e05a7..d6e8f8b 100644
--- a/src/ui/specificheatcomparisonmethodform.h
+++ b/src/ui/specificheatcomparisonmethodform.h
@@ -25,6 +25,8 @@ public:
StandardSample,
Sample
};
+signals:
+ void sigDrawCustomText(const QString);
public slots:
void slotSetCurve(const int ,QCPCurve*);
protected: